diff options
author | Georg Brandl <georg@python.org> | 2009-05-17 13:00:36 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-05-17 13:00:36 (GMT) |
commit | 036490d025b768c9e69567c3caac63ccd7a62a09 (patch) | |
tree | aeb86dff3b316514ee06be484fe0e482bcd83a12 /Doc/library/functools.rst | |
parent | cd86925b3bb994a8b2662cbe04be356768df5e86 (diff) | |
download | cpython-036490d025b768c9e69567c3caac63ccd7a62a09.zip cpython-036490d025b768c9e69567c3caac63ccd7a62a09.tar.gz cpython-036490d025b768c9e69567c3caac63ccd7a62a09.tar.bz2 |
More conversion to new-style optional args.
Diffstat (limited to 'Doc/library/functools.rst')
-rw-r--r-- | Doc/library/functools.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 6fd3cf9..94be636 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -15,7 +15,7 @@ function for the purposes of this module. The :mod:`functools` module defines the following functions: -.. function:: partial(func[,*args][, **keywords]) +.. function:: partial(func, *args, **keywords) Return a new :class:`partial` object which when called will behave like *func* called with the positional arguments *args* and keyword arguments *keywords*. If @@ -58,7 +58,7 @@ The :mod:`functools` module defines the following functions: *sequence* contains only one item, the first item is returned. -.. function:: update_wrapper(wrapper, wrapped[, assigned][, updated]) +.. function:: update_wrapper(wrapper, wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES) Update a *wrapper* function to look like the *wrapped* function. The optional arguments are tuples to specify which attributes of the original function are @@ -77,7 +77,7 @@ The :mod:`functools` module defines the following functions: than helpful. -.. function:: wraps(wrapped[, assigned][, updated]) +.. function:: wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES) This is a convenience function for invoking ``partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)`` as a function decorator |