From e1dae9e73956e345a04412a9404d064692b123d1 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Wed, 20 Mar 2024 17:41:13 +0100 Subject: [PATCH] fix confusing in-code doc example; closes #288 --- content/in-code-documentation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/in-code-documentation.md b/content/in-code-documentation.md index 5915dd9..44274ad 100644 --- a/content/in-code-documentation.md +++ b/content/in-code-documentation.md @@ -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?