Skip to content

Commit 8c981eb

Browse files
committed
Debugger example
1 parent 69b500c commit 8c981eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ from functools import wraps
557557
def debug(func):
558558
@wraps(func) # Needed for metadata copying (func name, ...).
559559
def out(*args, **kwargs):
560-
print(func.__name__)
560+
print(f'You called function {func.__name__!r}.')
561561
return func(*args, **kwargs)
562562
return out
563563

@@ -566,6 +566,12 @@ def add(x, y):
566566
return x + y
567567
```
568568

569+
```python
570+
>>> add(2, 2)
571+
You called function 'add'.
572+
4
573+
```
574+
569575

570576
Class
571577
-----

0 commit comments

Comments
 (0)