Skip to content

Commit

Permalink
Merge pull request #290 from coderefinery/radovan/fix-confusing-example
Browse files Browse the repository at this point in the history
fix confusing in-code doc example; closes #288
  • Loading branch information
bast authored Mar 24, 2024
2 parents 0b6bdfd + e1dae9e commit 6fefaee
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 6fefaee

Please sign in to comment.