All pastes #524057 Raw Edit

Stuff

public python v1 · immutable
#524057 ·published 2007-05-30 23:54 UTC
rendered paste body
class DecorateMe(object):    def __init__(self, foo=None):        self.foo = foo    def __call__(self, func):        def wrapper(decorated_self, *args):            return func(decorated_self, self.foo, *args)        return wrapperclass Whatever(object):    @DecorateMe(42)    def b(self, *args):        print self, argsWhatever().b('a', 'b', 'c')