[Python-Dev] Changes to PEP 327: Decimal data type

Shane Hathaway shane at zope.com
Thu Mar 18 10:18:19 EST 2004


Tim Peters wrote:
> More importantly, lower_names are correct.  This gets confused in PythonLand
> because some major contributors (like Zope Corp) have institutionalized
> aWrongPolicy for naming methods.  If you don't believe me, ask Barry.  I
> believe him on this issue because he just can't be wrong about *everything*
> <wink>.

Since most of my Python work has been on Zope, I didn't notice Python 
has this naming convention until this thread.  I've read PEP 8 several 
times, but the "method names" section only says to use lowercase.  It 
doesn't say what to do if the method name requires multiple words.  This 
is left to interpretation by the reader, and I've always interpreted it 
as meaning mixedCase.  People who come to Python through Zope tend to 
guess that Python uses the same naming conventions as Java.

I suggest the "method names" section needs to be more specific to 
correct this misunderstanding.  Perhaps: "Use lowercase_with_underscores 
for all method names.  Single-word method names are preferred."  It 
might also say that not all of the Python library follows this 
convention, but all new modules will.

I think I'll convert Ape (http://hathaway.freezope.org/Software/Ape) to 
this convention.

Shane



More information about the Python-Dev mailing list