Is PEP-8 a Code or More of a Guideline?

Steven Bethard steven.bethard at gmail.com
Mon May 28 10:33:50 EDT 2007


John J. Lee wrote:
> Paul McGuire <ptmcg at austin.rr.com> writes:
> [...]
>> http://mail.python.org/pipermail/python-dev/2005-December/058750.html
>>
>> At first, Guido seemed ambivalent, and commented on the
>> contentiousness of the issue, but it seems that the "non-English
>> speakers can more easily find word breaks marked with underscores"
>> justification tipped the scale in favor of
>> lower_case_with_underscores.
> [...]
> 
> That rationale seems undermined by the frequent use of runtogether
> names in the standard library.  These can be confusing even to native
> speakers.  And every time you come up with a new name, or try to
> remember an old one, you have to decide or remember whether it's
> likethis or like_this.
> 
> Even as a native English speaker, some of these are tricky --
> e.g. urllib has a private class named "addinfourl".  "What's this
> 'fourl' we're adding in?"
> 
> (In fact, the method adds attributes named "info" and "url".  Even
> though I've read that name hundreds of times, my brain always insists
> on reading it "add in fourl".)
> 
> This is the worst of both worlds: inconsistent and hard to understand.

Sounds like a good candidate for a rename in Python 3000.

STeVe



More information about the Python-list mailing list