Hi, Pythoners.

AON LAZIO aonlazio at gmail.com
Wed Aug 13 22:33:06 CEST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080813/7582bda2/attachment.html>


More information about the Python-list mailing list