Skip to content

Commit 05551b4

Browse files
jpastuszukyasoob
authored andcommitted
Update context_managers.rst (yasoob#187)
Small typo fixed
1 parent e8aa372 commit 05551b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

context_managers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Let's dissect this method a little.
167167
1. Python encounters the ``yield`` keyword. Due to this it creates a
168168
generator instead of a normal function.
169169
2. Due to the decoration, contextmanager is called with the function
170-
name (``open\_file``) as it's argument.
170+
name (``open_file``) as it's argument.
171171
3. The ``contextmanager`` decorator returns the generator wrapped by the
172172
``GeneratorContextManager`` object.
173173
4. The ``GeneratorContextManager`` is assigned to the ``open_file``
@@ -180,4 +180,4 @@ Manager like this:
180180
.. code:: python
181181
182182
with open_file('some_file') as f:
183-
f.write('hola!')
183+
f.write('hola!')

0 commit comments

Comments
 (0)