Challenge
Environment check
Every useful bug report starts with the Python version. Ask Python for it with the platform and sys modules and print it the way python --version does.
5 results
Challenge
Every useful bug report starts with the Python version. Ask Python for it with the platform and sys modules and print it the way python --version does.
Challenge
…up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.
Article Python Fundamentals
…to become a function. Fixes happen in one place. Find a bug inside a function and you fix it once. Find a bug in copy-pasted code and you get to hunt down every copy. You will miss one. Everybody…
Challenge
A bare except: reports every fuel reading as bad, because it also catches a NameError from a typo. Predict the last line, find the hidden error, catch only ValueError and fix the typo, then write a…
Challenge
…one loop in one program. The alert checker and the daily report want to parse telemetry lines too, and copying the loop into each of them is how bugs get fixed in one place and not the other. Turn the…