Spacing conventions
Tim Golden
mail at timgolden.me.uk
Wed Sep 27 04:24:27 EDT 2017
> On 27/09/17 09:50, Bill wrote:
>> If you are teaching beginning students, do you expect them to try to
>> follow these sorts of conventions? Is it perfectly fine to let
>> "taste" guide you (I'm just trying to get a feel for the philosophy
>> here)?
I few years ago I wrote a few short blog posts about my own preferences
which contrasted with the PEP8 standard:
http://ramblings.timgolden.me.uk/2012/03/27/pep8-or-not/
http://ramblings.timgolden.me.uk/2012/03/29/more-on-pep8/
http://ramblings.timgolden.me.uk/2012/04/09/pep8-it-is-then/
The upshot was that, although I preferred my own style, I recognised the
benefit of using a common standard -- although without being slavish to it!
FWIW I'd already been programming Python for some years when I wrote
those posts: I wasn't just someone who'd discovered the language and had
no idea about its conventions.
I think with a few more years of experience, both in Python and in other
(mostly SQL) coding, a point I'd make is that having a common standard
reduces cognitive jarring -- it reduces one small barrier to
understanding someone else's code.
Of course, within any organisation, you can achieve that without using
Python's own convention, but my final decision was that following the
more universal Python convention was worthwhile for essentially the same
reason.
TJG
More information about the Python-list
mailing list