We don't really allow canonical question and answers. If you want to highlight something you can't whip up some example code and post a Q&A.
Bit annoying, but it will prevent a wave of crap on the site.
We were going to share common improvements on GitHub. But we've not got much there.
Explaining everything is long. And I don't think many people want to know why.
I've stopped explaining why as much any more. And I've had maybe one comment asking why something does something. At which point I add to the answer the why.
I may be writing some poorer answer due to this, however if you merge this with (1) you could just include a link to the information why.
I now write answers more like:
- Follow PEP8.
- Don't have bare
excepts.- Use
withwhen usingopen.with open('file', 'w') as f: try: f.write(1 / int(input())) except ZeroDivisionError: print("Zero can't be the denominator of a fraction.")