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

Michael Chermside mcherm at mcherm.com
Thu Mar 18 12:47:05 EST 2004


No sooner do I suggest that something is impossible:

Michael Chermside writes:
> Unfortunately, there is a flaw in your methodology, and I
> can't think of a reasonable way to correct for it.

Then someone here goes and DOES it:

Edward Loper writes:
> I ran a similar experiment, but counted the number of *modules* that 
> define each type of function (since presumably most modules are 
> internally consistent).

Good idea... I'd been considering and rejecting various dictionary
based approaches for identifying multi-word identifiers, but your
solution is better.

> Total modules defining functions: 985
> under_score+lowercase : 44%
> mixedCase+lowercase   : 22%
> lowercase only        : 16%
> InitialCaps           : 10%
> mixedCase only        : 2%
> under_score only      : 2%
> 
> So underscore is most common; but mixedCase has a definite presence.
   [...]
> p.s., I'm definitely +1 on making a stronger statement in the style 
> guide.  Consistency is good.

Yep, +1 from me too. And if we strengthen the statement in PEP 8, then 
all NEW library code will be consistant (beware the wrath of the PEP 8
Police!). More importantly, people engaged in green-field Python
projects will be much more likely to follow the practice. To make a
good start, I hereby state my intention to stop using mixedCase and
switch to under_scores instead.

-- Michael Chermside




More information about the Python-Dev mailing list