Skip to content

Commit 18d7d71

Browse files
committed
📝 Add encoding when opening files
1 parent f490286 commit 18d7d71

2 files changed

Lines changed: 194 additions & 135 deletions

File tree

docs/control-flow/with.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ context manager.
2020
.. literalinclude:: with.py
2121
:linenos:
2222

23-
A context manager is set up here, which encloses the :func:`open` function and
24-
the subsequent block. The predefined clean-up action of the context manager
25-
closes the file, even if an exception occurs. As long as the expression in the
26-
first line is executed without triggering an exception, the file is always
27-
closed. This code is equivalent to this code:
23+
A context manager is set up here, which encloses the :func:`python3:open`
24+
function and the subsequent block. The predefined clean-up action of the context
25+
manager closes the file, even if an exception occurs. As long as the expression
26+
in the first line is executed without triggering an exception, the file is
27+
always closed. This code is equivalent to this code:
2828

2929
.. literalinclude:: with_alt.py
3030
:linenos:

0 commit comments

Comments
 (0)