I'm trying to learn myself the super() function in Python.
I though I got a grasp of it untill I came over this example (2.6) and found myself stuck.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "test.py", line 9, in do_something
do_something = classmethod(do_something)
TypeError: unbound method do_something() must be called with B instance as first argument (got nothing instead)
>>>
It wasn't what I expected when I read this line right before the example:
If we're using a class method, we don't have an instance to call super with. Fortunately for us, super works even with a type as the second argument. --- The type can be passed directly to super as shown below.
Which is exactly what Python tells me is not possible by saying that do_something() should be called with an instance of B.
Thanks in advance