dictionary and __getattr__

Emile van Sebille emile at fenx.com
Thu Sep 6 10:27:59 EDT 2001


"Chris Ryland" <cpr at emsoftware.com> wrote in message
news:8827e15d.0109060614.59036c18 at posting.google.com...
>
> Hey, won't the new 2.2 support for extending built-in classes such as
> dictionaries make this both easy and complete?
>
> --Chris Ryland, Em Software

I'm not sure that any level of getattr trickery will be complete.  How would
you ever recognize both 1's in:

d = {1:1, '1':'One'}

d.1  #?? what does this mean ??

--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list