diff options
author | Michele Simionato <michele.simionato@gmail.com> | 2021-04-03 09:58:43 +0200 |
---|---|---|
committer | Michele Simionato <michele.simionato@gmail.com> | 2021-04-03 09:58:43 +0200 |
commit | c12ec8557d8834e4c5c7c59b8275f3694ea6039d (patch) | |
tree | de0de6f79c4e1de4ec6c59de2818a20cc88d2d6a | |
parent | 6bd88b67493f056603def905ee59a11cefaa47b6 (diff) | |
download | python-decorator-git-c12ec8557d8834e4c5c7c59b8275f3694ea6039d.tar.gz |
Markdown fix5.0.4
-rw-r--r-- | docs/documentation.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/documentation.md b/docs/documentation.md index ecd7a79..1baa757 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -1481,22 +1481,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: |