case-sensitivity compromise proposal

Thomas Heller thomas.heller at ion-tof.com
Tue May 23 09:10:12 EDT 2000


[Mark]
> 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...
>

Not long ago I proposed to extend instance-objects to accept mappings
(UserDict or even C-extensions) as __dict__ instead of real dictionaries
only.

I got no responses, and gave up to convince Guido.
Apart from allowing case insensivity for instance objects
this could also be used to play other nice tricks.

Performace seemed not to be an issue: The measured results of pystone
were the same for the patched and the unpatched interpreter.

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

Thomas





More information about the Python-list mailing list