Skip to content

Commit

Permalink
Markdown fix
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Apr 3, 2021
1 parent 6bd88b6 commit c12ec85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/documentation.md
Expand Up @@ -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:
Expand Down

0 comments on commit c12ec85

Please sign in to comment.