Skip to content

Commit 2ffc63b

Browse files
authored
Merge pull request fbaptiste#65 from irvanalhaq9/deepdive-edit
add return fn in inner function of decorator counter
2 parents 23590dd + 1bc227b commit 2ffc63b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Part 1/Section 07 - Scopes, Closures and Decorators/02 - Nonlocal Scopes.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"Functions defined inside anther function can reference variables from that enclosing scope, just like functions can reference variables from the global scope."
14+
"Functions defined inside another function can reference variables from that enclosing scope, just like functions can reference variables from the global scope."
1515
]
1616
},
1717
{

Part 1/Section 07 - Scopes, Closures and Decorators/06 - Decorators - Part 1.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@
645645
" nonlocal count\n",
646646
" count += 1\n",
647647
" print(\"{0} was called {1} times\".format(fn.__name__, count))\n",
648+
" return fn(*args, **kwargs)\n",
648649
"\n",
649650
" return inner"
650651
]

0 commit comments

Comments
 (0)