Skip to content

Commit aec2b01

Browse files
committed
W5: Finish decorators
1 parent 28b5e4d commit aec2b01

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

week5/w5.ipynb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,9 @@
557557
"cell_type": "markdown",
558558
"metadata": {},
559559
"source": [
560-
"However, we can go one step further and make our code a bit nicer with *syntatic sugar*"
560+
"However, we can go one step further and make our code a bit nicer with *syntatic sugar*.\n",
561+
"`@requires_authorisation` is a decorator! Decorators provide us with a way of modifying the\n",
562+
"behavior of a function without modifying its body."
561563
]
562564
},
563565
{
@@ -591,6 +593,13 @@
591593
"deposit_monies(\"donald knuth\")"
592594
]
593595
},
596+
{
597+
"cell_type": "markdown",
598+
"metadata": {},
599+
"source": [
600+
"For now, you don't need to worry about the implementation details. The important part is understanding what decorators do: modify the behavior of an existing function."
601+
]
602+
},
594603
{
595604
"cell_type": "markdown",
596605
"metadata": {},

0 commit comments

Comments
 (0)