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 wanteveryone wants to know why.
And so I've stopped explaining why as much any more. And I've had maybe one comment askinguser ask me to provide why something does something. At which point, and so I add the why to the answer the why. Leading to a somewhat 'lazy' answer.
I may be writing some poorer answer due to this, howevernot 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.")