case-sensitivity compromise proposal

Mark Hammond mhammond at skippinet.com.au
Tue May 23 08:53:34 EDT 2000


For baby-steps, another alternative would be to allow exec and eval to
take dictionary-like objects (eg, a UserDict instance) as well as real
dictionaries (which it insists on now).

Then, we could simply implement a case-insensitive dictionary, and viola -
we are nearly done.  A fairly trivial remapping of import could then turn
any module you like into a case-insensitive environment...

I brought this up once before (for COM, where case-insensitivity would
also remove a few surprises for a few people coming from VB etc), and the
main concern was performance - going via the abstract "mapping" methods is
slower than direct dictionary access.  However, this was before
case-insensitivity was even at twinkle in the best troller's eye ;-)

But if it could be done, it would probably provide a fairly
non-controversial way for people to experiment with the feature...

Mark.

"Steven D. Arnold" <stevena at permanent.cc> wrote in message
news:4.3.1.2.20000523075551.014d9e70 at phear.dementian.com...
> How about a pragma to indicate whether a given Python module was
> case-insensitive?  Since Python is case-sensitive now, and to assist
with
> backward compatibility, I propose that case-sensitivity should be the






More information about the Python-list mailing list