Skip to content

Commit ad4843e

Browse files
authored
Merge pull request fbaptiste#40 from WillieMaddox/patch-30
Update 06 - The contextmanager Decorator.ipynb
2 parents fd2fbe6 + 396d249 commit ad4843e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Part 2/Section 10 - Context Managers/06 - The contextmanager Decorator.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
"\n",
238238
"Our code was not very robust, either in the context manager class or in the decorator - and it would take quite a bit more work to make it so.\n",
239239
"\n",
240-
"Fortunately the standard library has already though of this - in fact that was one of the critical goals of Python's context managers - the ability to create context managers using generator functions (see PEP 343)."
240+
"Fortunately the standard library already has this implemented for us - in fact that was one of the critical goals of Python's context managers - the ability to create context managers using generator functions (see PEP 343)."
241241
]
242242
},
243243
{
@@ -478,7 +478,7 @@
478478
"source": [
479479
"The `contextlib` module actually implements a `stdout` redirect context manager, so we technically don't have to write one ourselves.\n",
480480
"\n",
481-
"The difference from thge one we wrote is that it needs an open file object, not just a file name. So we would have to open the file, then redirect stdout. We can do this easily by nesting two context managers as follows:"
481+
"The difference from the one we wrote is that it needs an open file object, not just a file name. So we would have to open the file, then redirect stdout. We can do this easily by nesting two context managers as follows:"
482482
]
483483
},
484484
{

0 commit comments

Comments
 (0)