Language change and code breaks

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed Jul 25 12:42:40 CEST 2001


Guido van Rossum <guido at python.org> wrote in news:cpofq9a858.fsf at cj20424-
a.reston1.va.home.com:

> 
> But never mind, I'm giving up on making *Python* case-insensitive.
> The hostility of the user community is frightening.

I think at this point a polite 'thank you' is due from the user community.

It might be an idea though to change some of the error messages when a 
NameError or AttributeError is uncaught if a name could have matched with 
different case (although I'm not sure how much overhead this might cause).

NameError: name 'x' is not defined
could become:
NameError: name 'x' is not defined, nearest match was 'X'

or
AttributeError: C instance has no attribute 'Foo'
could become:
AttributeError: C instance has no attribute 'Foo', did you mean 'foo'?

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list