[Python-Dev] PEP 8 updates/clarifications
Ian Bicking
ianb at colorstudy.com
Thu Dec 15 06:50:19 CET 2005
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.
I'd say that there's pretty strong support of underscores for functions,
and less so for methods.
But that doesn't really matter that much -- it's still valid to say that
there's a preference, because there's a lot of code being created that
doesn't have to be consistent with anything in particular, or has to be
consistent with conflicting styles and must choose one. A suggestion in
PEP 8 is better than flipping a coin.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Python-Dev
mailing list