PEP0238 lament AND Re: Case (In)sensitivity

Peter Hansen peter at engcorp.com
Tue Jul 24 23:41:21 EDT 2001


Stephen Horne wrote:
> 
> On Mon, 23 Jul 2001 18:35:35 -0500, "Chris Gonnerman"
> <chris.gonnerman at newcenturycomputers.net> wrote:
> 
> >Both of these changes fall in the same group IMHO... they
> >break a lot of code.
> 
> Case insenstitivity is also a serious issue for me - it might even
> bite me for adopting a case-based naming convention as an apparently
> sensible way to avoid future identifier conflicts - [...]
> 
> Anyway, it's probably less an issue for me than division - I use
> integer division a lot, whereas defining different identifiers with
> only case-changes to distinguish them is a definite no-no.

This last item should always be said in conjunction with an 
"in my opinion"... We *frequently* use identifiers which differ
only in case from their class name.  We also use identifiers 
which are identical to other identifiers except for case, primarily
when we have a large series of CONSTANTS defined somewhere.

In this case, it is even supported directly by advice in our
Coding Conventions document.  The code is readable, logical,
consistant, and *would break* of course if case-sensitivity ever
became an issue.  (Which, apparently, it won't, according to 
a posting of Guido's within the last day or two.  Thankfully.)

(This appears to be a religious issue, and I'm not sure
anyone can have an argument other than "it's bad" to
attempt to convince me that this is not a perfectly valid
use of case sensitivity, on which I've counted for years.)

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list