[Python-3000] Will standard library modules comply with PEP 8?

Jim Jewett jimjjewett at gmail.com
Wed Aug 29 00:47:30 CEST 2007


On 8/28/07, Benji York <benji at benjiyork.com> wrote:
> Blake Winton wrote:
> > Raymond Hettinger wrote:
> >>> On Aug 27, 2007, at 6:16 PM, john.m.camara at comcast.net wrote:

> >> Ask ten of your programmer friends to write down "result equals
> >> object dot get value" ...

> > Sure, but given the rise of Java, how many of them will spell it with a
> > capital 'V'?   ;)

> > On the one hand, I really like consistency in my programming languages.
> > On the other hand, a foolish consistency is the hobgoblin of little minds.

> I call quote misapplication.  Having predictable identifier names isn't
> "foolish".

Agreed; the question is what is predictable.

When I worked in Common Lisp, the separators were usually _ or -, and
it was a royal pain to remember which.

In python, there isn't a consistent separator, because it can be any
of runthewordstogether, wordBreaksCapitalize, IncludingFirstWord, or
underscore_is_your_friend.

Unfortunately, even if we picked a single convention, it still
wouldn't always seem right, because sometimes the words represent
different kinds of things ("get" and name) or involve acronyms that
already have their own capitalization rules (HTTP).  So we can't
possibly get perfect consistency.

If we're at (made-up numbers) 85% now, and can only get to 95%, and
that extra 10% would break other consistencies that we didn't consider
(such as consistency with wrapped code) ... is it really worth
incompatibilities?

-jJ


More information about the Python-3000 mailing list