What's up with the new super method? It tells me it takes a type and not a class...
 
Am I using it wrong?
 
>>> class A:
...  def speak(self):
...   print 'hi'
...
>>> class B(A):
...  def speak(self):
...   super(B, self).speak()
...   print 'there'
...
>>> obj = B()
>>> obj.speak()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "<stdin>", line 3, in speak
TypeError: super() argument 1 must be type, not class
>>>
 
Matthew

Reply via email to