Yet Another Case Question

Tim Churches tchur at optushome.com.au
Sat Feb 22 13:25:57 EST 2003


David Mertz, Ph.D. wrote
>  - If names were case-insensitive, string literals would have to be so
>    too.  With all due respect to my friend Tim Churches, this notion
is
>    just plain whacked.

Hey, I haven't smoked anything for decades! True! It's bad for your
health. 

But I will re-iterate my whacked argument: one reason for
case-sensitivity is that it avoids having to explain to beginners why
the names of things are case-insensitive but the values of things are
case-sensitive. Or put another way, the rule for the comparison of
values of strings also applies to comparison of the names of strings
(and the names of other things too). That sort of conceptual consistency
is very Pythonic, even if it makes life less convenient. Add too many
convenient special cases (like print >> file) and you end up with Perl.

Tim C








More information about the Python-list mailing list