I have come across this code and I tried to figure out what does it do
First, I do not understand the sign @... above the class method, what does
it do?
Second, about the object in AnyWrapper(object), why do they declare "object"
as the superclass?
sometimes I saw (type) what the differences between "object" and "type"?
from ib.lib.overloading import overloaded
class AnyWrapper(object):
@overloaded
def error(self, e):
raise NotImplementedError()
@error.register(object, str)
def error_0(self, strval):
raise NotImplementedError()
Thanks in advance
Aonlazio
--
http://mail.python.org/mailman/listinfo/python-list