question on dict subclassing and overriding __setitems__

Eric S. Johansson esj at harvee.org
Tue Jun 13 22:14:06 EDT 2006


Diez B. Roggisch wrote:
>            dict.__setitem__(self, index.upper()) = value

oh duh.

> Or better even
> 
>            super(subclass, self).__setitem__(key.upper(), value)

hmm.  http://fuhm.net/super-harmful/

I think I need to do some more reading.

---eric




More information about the Python-list mailing list