Skip to content

Conversation

@walternathan6754
Copy link
Contributor

This commit fixes the line numbers referred to in the normalize_rectangle function of defensive programming were incorrect. My guess is the comment line was added later, and the line numbers were not updated.

Also added the line numbers for the post-conditions "The post-conditions on lines 17 and 18...". I thought this would clarify to learners which assertions were preconditions and which ones were post-conditions.

The line numbers referred to in the normalize_rectangle function of defensive programming were incorrect.  My guess is the comment line was added later, and the line numbers were not updated.  I corrected "The preconditions on lines 2, 4, and 5 catch invalid inputs:" to be "The preconditions on lines 3, 5, and 6 catch invalid inputs:" and "...we realize that line 10..." to be "...we realize that line 11..."

Also added the line numbers for the post-conditions "The post-conditions on lines 17 and 18...".  This clarifies to learners which assertions were preconditions and which ones were post-conditions
Fixed incorrect line numbers in 08-defensive.md
@valentina-s
Copy link
Contributor

Thanks for the correction! Maybe we should also add the line numbers to the code excerpt?

@valentina-s valentina-s merged commit 285b88e into swcarpentry:gh-pages Feb 3, 2017
zkamvar pushed a commit that referenced this pull request Apr 21, 2023
Fixed incorrect line numbers in 08-defensive.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants