Home | History | Annotate | Download | only in python2.7

Lines Matching refs:wrapper

3 # Python module wrapper for _functools C module
13 # wrapper functions that can handle naive introspection
17 def update_wrapper(wrapper,
21 """Update a wrapper function to look like the wrapped function
23 wrapper is the function to be updated
26 from the wrapped function to the wrapper function (defaults to
28 updated is a tuple naming the attributes of the wrapper that
33 setattr(wrapper, attr, getattr(wrapped, attr))
35 getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
36 # Return the wrapper so this can be used as a decorator via partial()
37 return wrapper
42 """Decorator factory to apply update_wrapper() to a wrapper function
45 function as the wrapper argument and the arguments to wraps() as the