Re: question on dict subclassing and overriding __setitems__

2006-06-13 Thread George Sakkis
Eric S. Johansson wrote: > Diez B. Roggisch wrote: > > Or better even > > > >super(subclass, self).__setitem__(key.upper(), value) > > hmm. http://fuhm.net/super-harmful/ Interesting link, didn't know about it. I've always found super() ugly and doubted that it was in practice better

Re: question on dict subclassing and overriding __setitems__

2006-06-13 Thread Eric S. Johansson
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 -- http://mail.python.org/mai

Re: question on dict subclassing and overriding __setitems__

2006-06-13 Thread Diez B. Roggisch
Eric S. Johansson schrieb: > I apologize if this is an FAQ but googling has not turned up anything, > at least to my keywords. > > I need to parse a configuration file from an existing application and > I'm treating it as a dictionary. I created my class with a parent class > of dict. Everyth

question on dict subclassing and overriding __setitems__

2006-06-13 Thread Eric S. Johansson
I apologize if this is an FAQ but googling has not turned up anything, at least to my keywords. I need to parse a configuration file from an existing application and I'm treating it as a dictionary. I created my class with a parent class of dict. Everything works okay except I discover I need