Skip to content

Commit 053731f

Browse files
committed
fix: minor updates after teaching
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 6549cde commit 053731f

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

notebooks/1.4 Debugging.ipynb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@
4040
" await micropip.install(\"rich\")"
4141
]
4242
},
43-
{
44-
"cell_type": "code",
45-
"execution_count": null,
46-
"metadata": {},
47-
"outputs": [],
48-
"source": [
49-
"from typing import Tuple\n",
50-
"import sys"
51-
]
52-
},
5343
{
5444
"cell_type": "code",
5545
"execution_count": null,
@@ -66,7 +56,7 @@
6656
"metadata": {},
6757
"outputs": [],
6858
"source": [
69-
"def my_broken_function() -> Tuple[int, int]:\n",
59+
"def my_broken_function() -> tuple[int, int]:\n",
7060
" x = 6\n",
7161
" y = 4\n",
7262
" x += 2\n",
@@ -206,9 +196,9 @@
206196
"outputs": [],
207197
"source": [
208198
"def my_broken_function():\n",
209-
" # breakpoint()\n",
210199
" x = 6\n",
211200
" y = 4\n",
201+
" # breakpoint()\n",
212202
" x += 2\n",
213203
" y *= 2\n",
214204
" x -= y\n",

notebooks/2.3 Decorators.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"source": [
3232
"def bad_decorator(func):\n",
3333
" print(f\"You don't need {func.__name__}!\")\n",
34-
" return 2\n",
34+
" return 42\n",
3535
"\n",
3636
"\n",
3737
"@bad_decorator\n",
@@ -142,7 +142,7 @@
142142
"import time\n",
143143
"\n",
144144
"\n",
145-
"@functools.lru_cache\n",
145+
"@functools.cache\n",
146146
"def slow(x: int) -> int:\n",
147147
" time.sleep(2)\n",
148148
" return x"

0 commit comments

Comments
 (0)