Skip to content

Commit

Permalink
fix confusing in-code doc example; closes #288
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Mar 20, 2024
1 parent 0b6bdfd commit e1dae9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/in-code-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ In this episode we will learn how to write good documentation inside your code.
**Comment A**
```python
# now we check if temperature is larger than -50
if temperature > -50:
# now we check if temperature is below -50
if temperature < -50:
print("ERROR: temperature is too low")
```
**Comment B**
```python
# we regard temperatures below -50 degrees as measurement errors
if temperature > -50:
if temperature < -50:
print("ERROR: temperature is too low")
```
Which of these comments is more useful? Can you explain why?
Expand Down

0 comments on commit e1dae9e

Please sign in to comment.