[Python-Dev] PEP 8 updates/clarifications

Phillip J. Eby pje at telecommunity.com
Thu Dec 15 07:01:13 CET 2005


At 11:50 PM 12/14/2005 -0600, Ian Bicking wrote:
>Guido van Rossum wrote:
> > On 12/14/05, Barry Warsaw <barry at python.org> wrote:
> >
> >>On Thu, 2005-12-15 at 11:13 +1100, Dave Cole wrote:
> >>
> >>
> >>>The only thing I strongly disagree with is the promotion of javaNaming
> >>>to equal footing with python_naming.
> >>
> >>Actually, they're not on equal footing atm.  I happen to agree with you
> >>though.
> >
> >
> > It doesn't matter. Many large projects are adopting the camelCase
> > convention, either by choice or by accident. I did a brief review of
> > Zope 3 and Chandler, and while neither is consistent, camelCase
> > prevails (Chandler also has a lot of CapWords method names, wihch
> > suggests they didn't get this from Java -- maybe from C++?).
>
>Everything that touches wx seems to adopt CapWords method names -- in
>part (hopefully) or in whole.  Wx's API comes from Windows, and the
>Microsoft method conventions.

Yes, at least the Chandler use of CapWords is due to wx influence (and 
perhaps a little of Visual Basic as well).  In theory we use PEP 8 as the 
basis for the project's style guidelines, but in practice, code that works 
with wxPython has to at least use CapWords for overriding methods defined 
by wx.  In addition, there's a heavy Java influence due to the use of 
PyLucene and other SWIG-wrapped Java compiled to C.

So, as a practical matter, a One True Naming Style isn't going to happen 
soon, certainly not in Chandler.  We are making some progress getting rid 
of Java-isms like classes named 'blah.foo.foo.foo.Foo', though.  :)



More information about the Python-Dev mailing list