diff options
Diffstat (limited to 'src/tests/documentation.py')
| -rw-r--r-- | src/tests/documentation.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/documentation.py b/src/tests/documentation.py index e34040b..67bb44a 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -1119,22 +1119,28 @@ In previous versions of the decorator module the caller, with an empty ``kwargs`` dictionary. In version 5.X instead even ``args`` is empty: +```python >>> printsum() () {} 3 +``` ``args`` become non-empty only if you pass the arguments as positional +```python >>> printsum(1) (1,) {} 3 +``` and not if you pass them as keyword arguments: +```python >>> printsum(x=1) () {'x': 1} 3 +``` This can be pretty confusing since non-keyword arguments are passed as keywork arguments, but it the way it works with ``functools.wraps`` and the way many people expect it to work: |
