File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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:
You can’t perform that action at this time.
0 commit comments