Re: Error when calling superclass __init__ method

2008-05-18 Thread Peter Otten
Maese Fernando wrote: > I'm getting an odd error while trying to call the __init__ method of a > super class: > > BaseField.__init__(self) > TypeError: unbound method __init__() must be called with BaseField > instance as first argument (got nothing instead) > > > This is the code: No, it isn'

Error when calling superclass __init__ method

2008-05-18 Thread Maese Fernando
Hi, I'm getting an odd error while trying to call the __init__ method of a super class: BaseField.__init__(self) TypeError: unbound method __init__() must be called with BaseField instance as first argument (got nothing instead) This is the code: class BaseField(object): def _addFieldsTo

Re: calling superclass __init__ when superclass is object

2007-08-01 Thread Evan Klitzke
On 8/1/07, Evan Klitzke <[EMAIL PROTECTED]> wrote: > Hi list, > > I was reading this article: http://fuhm.net/super-harmful/ and didn't > understand the comment about calling super(Foo, self).__init__() when > Foo inherits only from object. Can someone on the list elaborate more > on why one should

calling superclass __init__ when superclass is object

2007-08-01 Thread Evan Klitzke
Hi list, I was reading this article: http://fuhm.net/super-harmful/ and didn't understand the comment about calling super(Foo, self).__init__() when Foo inherits only from object. Can someone on the list elaborate more on why one should do this? -- Evan Klitzke <[EMAIL PROTECTED]> -- http://mai

Re: Calling superclass

2006-05-04 Thread Diez B. Roggisch
Florian Lindner wrote: > Hello, > I try to call the superclass of the ConfigParser object: > > class CustomizedConfParser(ConfigParser.SafeConfigParser): > def get(self, section, attribute): > try: > return super(CustomizedConfParser, self).get(section, > attri

Calling superclass

2006-05-04 Thread Florian Lindner
Hello, I try to call the superclass of the ConfigParser object: class CustomizedConfParser(ConfigParser.SafeConfigParser): def get(self, section, attribute): try: return super(CustomizedConfParser, self).get(section, attribute) # [...] but that gives only ret