Skip to content

Commit 6499d35

Browse files
committed
minor fixes to session 3
1 parent 80947da commit 6499d35

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎Session 3 - Advanced Functions/Session 3 - Advanced Functions.ipynb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
"source": [
363363
"## Generators\n",
364364
"A generator is a special iterable function that does not terminate but wait for you to request the next output.\n",
365-
"For this it uses the `yield` keyword that keeps the namespace inside the function alive until a `return` keyword is reached.\n",
365+
"For this it uses the `yield` keyword that keeps the namespace inside the function alive until a `return` keyword is reached or there's no more code to run.\n",
366366
"To ask a generator for its next output you use the `next()` function."
367367
]
368368
},
@@ -1264,7 +1264,7 @@
12641264
"name": "python",
12651265
"nbconvert_exporter": "python",
12661266
"pygments_lexer": "ipython3",
1267-
"version": "3.7.6"
1267+
"version": "3.7.5"
12681268
},
12691269
"latex_envs": {
12701270
"LaTeX_envs_menu_present": true,

‎Session 3 - Advanced Functions/Session 3 - Exercise solutions.ipynb‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@
402402
" with open(filename, 'w') as f:\n",
403403
" print('ready to write')\n",
404404
" while True:\n",
405-
" str = yield\n",
406-
" f.write(str)\n",
407-
" print(f'just wrote \"{str}\" to file \"{filename}\"')"
405+
" string = yield\n",
406+
" f.write(string)\n",
407+
" print(f'just wrote \"{string}\" to file \"{filename}\"')"
408408
]
409409
},
410410
{
@@ -779,7 +779,7 @@
779779
"name": "python",
780780
"nbconvert_exporter": "python",
781781
"pygments_lexer": "ipython3",
782-
"version": "3.7.6"
782+
"version": "3.7.5"
783783
},
784784
"latex_envs": {
785785
"LaTeX_envs_menu_present": true,

0 commit comments

Comments
 (0)