Case sensitivity

Alex Martelli aleax at
Sat Feb 22 00:43:41 CET 2003

Erik Max Francis wrote:

> Is that _really_ the biggest problem a beginning programmer has with
> learning Python?  I very seriously doubt it.  I would think that the

No, but it's (almost) the only problem that is gratuitous in this way.

E.g., many beginners DO have problems with the fact that just
MENTIONING a function or method doesn't CALL it -- that you need
to put parentheses after it, even when there are no arguments
inside the parentheses, in order to perform the actual call.  But
there are excellent reasons for that -- the fact that callables
are first-class objects, so they can be handled just like any
other object, and "call this thingy here" is thus an "operator".
Having a good, solid rationale helps them get over the initial
problem, and after a while the problem does not recur.

Compare and contrast with another tiny wart: the gratuitous
syntax difference between classes with no bases and functions
with no arguments.  For functions without arguments you MUST
use empty parentheses between the name and the colon; for
classes you are FORBIDDEN to use empty parentheses in the same
syntax position.  *THAT* sort of gratuitous inconsistency,
without any solid "you'll be happy of this in the future
because..." behind it, is the bane of teachers and beginners.

Case sensitivity, while still small, is worse, because it
recurs EVERY time you use a large module for which you have
not fully memorized every case choice -- it keeps hurting your
productivity because you DO have to memorize, or check, every
such detail, forever.

> learning of the basics of programming and wrapping their minds around
> that would be a much larger task.
> Beginners are beginners, they aren't stupid.  "Case matters, so remember
> to watch it."

Yep, they aren't stupid -- exactly because of this they can
resent the arbitrary errors they get, because of "errors" that
*SHOULD NOT* matter and in fact DO NOT matter in other
languages they may previously have met, such as Pascal (very
popular in Italian high schools to this day, for example),
e.g. spelling something "StringIo" instead of "StringIO".

Inevitable problems, conceptual ones that _must_ be faced, are
one thing.  Throwing further obstacles in beginners' paths,
arbitrarily forcing them to memorize the case of every silly
MixedCaseName in the world, and then adding insult to injury
by claiming that's a GOOD thing, is quite another -- small as
the wart may be, I'm particularly irked by the latter attitude.

And so around and around we go, burning time and energy
fruitlessly on a thread that will never give results because
Guido's been frigthened by this newsgroup's hostility on the
subject.  So it goes.  But I hope that if some beginners ARE
reading this thread, and starting to doubt of their sanity
and common sense by hearing PRAISE of the wart that they are
recognizing as such, my words can hearten them: it IS a wart,
you're right in disliking it, and you can "thank" attitudes
such as this "remember to watch it" for its permanence.


More information about the Python-list mailing list