On Friday, May 5, 2023 at 6:01:33 PM UTC-4 Edward K. Ream wrote:

On Fri, May 5, 2023 at 3:24 PM jkn <[email protected]> wrote:

https://peps.python.org/pep-0008/

"This document gives coding conventions for the Python code *comprising the 
standard library* in the main Python distribution"


Pep 8 contains many caveats and subtle points. I don't want to debate those 
:-)

The mixture of camelCase and underscore_case does sometimes upset newbies, 
but I think most of us agree that we can't change names.

PEP-8 goes on to say -

"... code is read much more often than it is written. The guidelines 
provided here are intended to improve the readability of code and make it 
consistent across the wide spectrum of Python code. As PEP 20 
<https://peps.python.org/pep-0020> says, “Readability counts”."

And

"In particular: do not break backwards compatibility just to comply with 
this PEP!

Some other good reasons to ignore a particular guideline:

   1. When applying the guideline would make the code less readable, even 
   for someone who is used to reading code that follows this PEP.
   2. To be consistent with surrounding code that also breaks it (maybe for 
   historic reasons) – although this is also an opportunity to clean up 
   someone else’s mess (in true XP style).
   3. Because the code in question predates the introduction of the 
   guideline and there is no other reason to be modifying that code.
   4. When the code needs to remain compatible with older versions of 
   Python that don’t support the feature recommended by the style guide." 


BTW, have you (anyone) tried the easter egg?

import this

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a93a7952-dfff-416a-8355-95d64293f8b6n%40googlegroups.com.

Reply via email to