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 everyone wants to know why.
And so I've stopped explaining why as much any more. I've had maybe one user ask me to provide why, and so I add the why to the answer. Leading to a somewhat 'lazy' answer.
I may be writing some poorer answer due to not explaining why. And so if you merge this with (1) you could just include a link to the information why, and not suffer any reduction in quality in your answers.
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.")