dictionary and __getattr__

Skip Montanaro skip at pobox.com
Thu Sep 6 19:00:23 CEST 2001

    > Hey, won't the new 2.2 support for extending built-in classes such as
    > dictionaries make this both easy and complete?


    Peter> Great, so now instead of KeyError you can get either KeyError
    Peter> _or_ AttributeError for what is effectively the same problem?

All I was doing was responding that, "yes, you can do this by subclassing
dictionary in 2.2.  I was making no judgement about the wisdom of doing

Skip Montanaro (skip at pobox.com)

More information about the Python-list mailing list