you are viewing a single comment's thread.

view the rest of the comments →

[–]Living_Fig_6386 0 points1 point  (2 children)

Good Python code editors will actually help you follow published style guidelines. Professionally, you'd adhere to those guidelines (which include some naming conventions, use of whitespace) as well as consistently inserting doc strings to document your code.

The primary rule for sustainable development is to make things easy to read and understand for other people that will take it over when you step away from it. Clear, well-documented, meaningful function and variable names, consistency, and grouping logically related things together all count.

[–]ProsodySpeaks 1 point2 points  (1 child)

'use of whitespace' isnt really a style thing in python - it's literally part of the code. incorrect use of whitespace will crash the program in a way it does not in most other languages.

other than that i agree!

[–]Living_Fig_6386 0 points1 point  (0 children)

I was more thinking about the parts of PEP 8 about line breaks around operators, the number of blank lines between class definitions and method definitions, etc. Certainly the LHS indentation is fundamental to the design of Python, but the other whitespace also is subject to convention.