Case-sensitivity: why -- or why not? (was Re: Damnation!)

Moshe Zadka moshez at math.huji.ac.il
Tue May 23 07:04:57 EDT 2000


[Moshe]
> >>>> A=1
> >>>> a
> > Traceback (innermost last):
> >   File "<stdin>", line 1, in ?
> > NameError: a
> >>>> a=1
> > Traceback (innermost last):
> >   File "<stdin>", line 1, in ?
> > NameError: A already exists
> 
> > (Thanks for Guido for giving me a copy of the binaries of 2003 Python.
> > This is without the --readable-error-messages switch)

[Martijn]
> Also, I don't think 
> this would help a lot in the newbie example. Your example might confuse
> newbies even more. ("I'm trying to assign to A and now I can't because A
> already exists?")

Let me re--run the examples with --reable-error-messages:

>>> a =  1
>>> A
NameError: "A" is not a defined name. Perhaps you mea n"a"?
>>> A = 1
NameError: "a" is defined, and "A" differs only by case

Is that understandable enough?
--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com





More information about the Python-list mailing list