En Sat, 30 Jan 2010 03:06:18 -0300, Steven D'Aprano
<st...@remove-this-cybersource.com.au> escribió:

class dualmethod(object):
    """Descriptor implementing dualmethods (combination
    class/instance method).

    Returns a method which takes either an instance or a class as
    the first argument. When called on an instance, the instance is
    passed as the first argument. When called as a class, the class
    itself is passed instead.

Seems useful!
Perhaps a better place to post it would be
<http://code.activestate.com/recipes/langs/python/>, at least it's easier
to search.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to