Base Class to Support Method Decorators

AUTHOR:

  • Martin Albrecht (2009-05): inspired by a conversation with and code by Mike Hansen
class sage.misc.method_decorator.MethodDecorator(f)

Bases: sage.structure.sage_object.SageObject

EXAMPLES:

sage: from sage.misc.method_decorator import MethodDecorator
sage: class Foo:
....:     @MethodDecorator
....:     def bar(self, x):
....:         return x**2
....:
sage: J = Foo()
sage: J.bar
<sage.misc.method_decorator.MethodDecorator object at ...>