Yet Another Case Question

David Mertz mertz at gnosis.cx
Sat Feb 22 23:25:44 EST 2003


|To use your example, some will write
|`maximumcolumns', some will write `maximumColumns', and some will write
|`MaximumColumns'.  This is, needless to say, obnoxious.  I don't think
|you can really argue against this point

Certainly people indeed do this.  That part I can't argue against.  Tell
me why this is BAD, again?  On the face of it, allowing such variation
seems like the very purpose of case-insensitivity.

Of course, if it is bad because "variable names should be case-
sensitive"... well, thsy seems a little circular.

|But the convention is much weaker if anyone can write them as
|`constants', thus diluting their usefulness as a convention.

This point is reasonable.  I would get annoyed if CONSTANTS were spelled
other than with uppercase.  Then again, I would also get annoyed in
almost the same way if the convention were used inconsistently in
Python, e.g.:

    CONSTANT1 = 22
    constant2 = 38

That isn't exactly the same problem as Erik lists.. but it is analogous.
And can only be eliminated by draconian style guides (or widespread
enough commonsense... the best solution to the other problem too).

Yours, David...

--
    _/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY: Postmodern Enterprises _/_/_/
   _/_/    ~~~~~~~~~~~~~~~~~~~~[mertz at gnosis.cx]~~~~~~~~~~~~~~~~~~~~~  _/_/
  _/_/  The opinions expressed here must be those of my employer...   _/_/
 _/_/_/_/_/_/_/_/_/_/ Surely you don't think that *I* believe them!  _/_/






More information about the Python-list mailing list