[Python-Dev] Changes to PEP 327: Decimal data type
Michael Chermside
mcherm at mcherm.com
Thu Mar 18 08:28:04 EST 2004
Greg writes:
> I just did an experiment which involved running the Python
> script appended below over the Library Reference index.
> The results were:
>
> Total names: 1908
> lower_names: 1684
> Percent lower: 88.2599580713
Unfortunately, there is a flaw in your methodology, and I
can't think of a reasonable way to correct for it. Consider
this code:
class AllMixedCase:
def thisIsMixedCase(): pass
def thisIsAlsoMixed(): pass
def mixed(): pass
class AllLowerCase:
def thisisalllowercase(): pass
def thisisalsolowercase(): pass
def lower(): pass
I'm guessing that your code counts 4 lowercase and 2 mixed
case. The problem is that a one-word mixedCase looks just
like a one-word lowercase. And when it's possible, using
a simple one-word name is a GOOD thing... so hopefully our
standard library is chock full of one-word functions.
I could also point out that in those cases where it ISN'T
possible to use one word, the alllowercaseformat is a real
pain to read, especially for non-native english speakers.
But that would start a coding-style war, and a major purpose
of having standards is to AVOID coding-style wars, so I'd
better not bring it up. ;-)
-- Michael Chermside
More information about the Python-Dev
mailing list