Module Expr Str Import alias Import alias Import alias Import alias FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr TryFinally body Return Call NameLoad NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr decorator_list Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore TupleLoad Str Str Str Assign NameStore Dict Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str FunctionDef arguments args NameParam defaults body Assert CompareEq Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args defaults vararg kwarg body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assert Call NameLoad NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad Assert Call NameLoad NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Return NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict FunctionDef arguments args defaults body If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad Return SubscriptLoad NameLoad Index NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults kwarg body Expr Str FunctionDef arguments args NameParam defaults body For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr BinOpMod Str Dict Str AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr Num Return Call NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A Decorator utility functions.

decorators:
- synchronized
- propertyx
- accepts
- returns
- singleton
- attrs
- deprecated
 N/A functools N/A warnings N/A threading N/A sys synchronized N/A N/A lock N/A None N/A N/A Decorator that synchronizes a method or a function with a mutex lock.

    Example usage:

        @synchronized()
        def operation(self, a, b):
            ...
     N/A N/A lock None N/A N/A lock N/A N/A threading Lock wrapper N/A N/A function N/A N/A new_function N/A N/A N/A args kwargs N/A N/A N/A N/A lock acquire N/A N/A N/A N/A function args kwargs N/A N/A N/A N/A lock release N/A N/A new_function N/A N/A wrapper N/A propertyx N/A N/A function N/A N/A N/A Decorator to easily create properties in classes.

    Example:

        class Angle(object):
            def __init__(self, rad):
                self._rad = rad

            @property
            def rad():
                def fget(self):
                    return self._rad
                def fset(self, angle):
                    if isinstance(angle, Angle):
                        angle = angle.rad
                    self._rad = float(angle)

    Arguments:
    - `function`: The function to be decorated.
     N/A keys N/A fget fset fdel N/A func_locals N/A doc N/A function __doc__ probe_func N/A N/A frame event arg N/A N/A N/A N/A event return N/A N/A locals N/A frame f_locals N/A N/A N/A func_locals update N/A dict N/A N/A k N/A N/A locals get k N/A k keys N/A N/A N/A sys settrace None N/A probe_func N/A N/A N/A N/A sys settrace probe_func N/A N/A function N/A N/A property func_locals N/A accepts N/A N/A N/A types N/A N/A Decorator to ensure that the decorated function accepts the given types as arguments.

    Example:
        @accepts(int, (int,float))
        @returns((int,float))
        def func(arg1, arg2):
            return arg1 * arg2
     check_accepts N/A N/A f N/A N/A N/A N/A N/A len types N/A N/A f __code__ co_argcount new_f N/A N/A N/A args kwds N/A N/A N/A a t N/A zip args types N/A N/A N/A isinstance a t N/A arg %r does not match %s N/A a t N/A N/A f args kwds N/A N/A N/A new_f __name__ N/A f __name__ N/A new_f N/A N/A check_accepts N/A returns N/A N/A rtype N/A N/A N/A Decorator to ensure that the decorated function returns the given
    type as argument.

    Example:
        @accepts(int, (int,float))
        @returns((int,float))
        def func(arg1, arg2):
            return arg1 * arg2
     check_returns N/A N/A f N/A N/A new_f N/A N/A N/A args kwds N/A N/A result N/A f args kwds N/A N/A isinstance result rtype N/A return value %r does not match %s N/A result rtype N/A result N/A N/A N/A new_f __name__ N/A f __name__ N/A new_f N/A N/A check_returns N/A singleton N/A N/A cls N/A N/A N/A Decorator to ensures a class follows the singleton pattern.

    Example:
        @singleton
        class MyClass:
            ...
     N/A instances N/A getinstance N/A N/A N/A N/A N/A N/A cls instances N/A N/A N/A instances N/A cls N/A cls N/A N/A instances N/A cls N/A N/A getinstance N/A attrs N/A N/A N/A kwds N/A N/A Decorator to add attributes to a function.

    Example:

        @attrs(versionadded="2.2",
               author="Guido van Rossum")
        def mymethod(f):
            ...
     decorate N/A N/A f N/A N/A N/A k kwds N/A N/A N/A setattr f k N/A kwds N/A k N/A f N/A N/A decorate N/A deprecated N/A N/A func N/A N/A N/A This is a decorator which can be used to mark functions
    as deprecated. It will result in a warning being emitted
    when the function is used.

    ## Usage examples ##
    @deprecated
    def my_func():
        pass

    @other_decorators_must_be_upper
    @deprecated
    def my_func():
        pass
     new_func N/A N/A N/A args kwargs N/A N/A N/A N/A warnings warn_explicit N/A Call to deprecated function %(funcname)s. N/A funcname N/A func __name__ category DeprecationWarning filename N/A N/A func __code__ co_filename lineno N/A N/A N/A func __code__ co_firstlineno 1 N/A N/A func args kwargs N/A N/A N/A functools wraps func N/A new_func N/A