Skip to content

Commit 96018a3

Browse files
committed
fixed decorator example
In the function to wrap, we print a string. In the decorator we return a string. Better to change them both to returning a string, since you're printing what it returns.
1 parent 12b8cb2 commit 96018a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

decorators.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ decorators.
251251
252252
@decorator_name
253253
def func():
254-
print("Function is running")
254+
return("Function is running")
255255
256256
can_run = True
257257
print(func())

0 commit comments

Comments
 (0)