Skip to content

Commit ccc922a

Browse files
committed
Update documentation to match new PEP 362 behavior.
1 parent a485b91 commit ccc922a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/api_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Comparison with `@with_signature`: `@wraps(f)` is equivalent to
166166

167167
In other words, as opposed to `@with_signature`, the metadata (doc, module name, etc.) is provided by the wrapped `wrapped_fun`, so that the created function seems to be identical (except possiblyfor the signature). Note that all options in `with_signature` can still be overrided using parameters of `@wraps`.
168168

169-
If the signature is *not* modified through `new_sig`, `remove_args`, `append_args` or `prepend_args`, the additional `__wrapped__` attribute on the created function, to stay consistent with the `functools.wraps` behaviour.
169+
The additional `__wrapped__` attribute is added on the created function, to stay consistent with the `functools.wraps` behaviour. If the signature is modified through `new_sig`, `remove_args`, `append_args` or `prepend_args`, the `__signature__` attribute will be added per [PEP 362](https://peps.python.org/pep-0362/).
170170

171171
See also [python documentation on @wraps](https://docs.python.org/3/library/functools.html#functools.wraps)
172172

0 commit comments

Comments
 (0)