-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
On section https://github.com/wilfredinni/python-cheatsheet/blob/master/docs/cheatsheet/debugging.md#logging
The text advises there is a bug in the following code and encourages the reader to execute the code to see how the logging functionality works, however when run, the script executes perfectly, and the debug messages confirm that. It appears the only bug in the code is that there isn't a bug.
I suspect when writing up this page, someone inadvertently 'corrected' the code before submitting it.
The nearest solution I could find to replicate the debug messages was changing:
for i in range(1, n + 1):to
for i in range(0, n + 1):or completely removing the 0 as a likely real-world scenario:
for i in range(n + 1):Metadata
Metadata
Assignees
Labels
No labels