File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1167,8 +1167,8 @@ Hello World!
1167
1167
1168
1168
#### List of existing context managers:
1169
1169
``` python
1170
- with open (' <path>' , ... ) as file : ...
1171
- with wave.open(' <path>' , ... ) as wave_file: ...
1170
+ with open (' <path>' ) as file : ...
1171
+ with wave.open(' <path>' ) as wave_file: ...
1172
1172
with memoryview (< bytes / bytearray / array> ) as view: ...
1173
1173
db = sqlite3.connect(' <path>' ); with db: db.execute(' <insert_query>' )
1174
1174
lock = threading.RLock(); with lock: ...
Original file line number Diff line number Diff line change 1095
1095
< span class ="hljs-meta "> ... </ span > print(file.read())
1096
1096
Hello World!
1097
1097
</ code > </ pre >
1098
- < div > < h4 id ="listofexistingcontextmanagers "> List of existing context managers:</ h4 > < pre > < code class ="python language-python hljs "> < span class ="hljs-keyword "> with</ span > open(< span class ="hljs-string "> '<path>'</ span > , ... ) < span class ="hljs-keyword "> as</ span > file: ...
1099
- < span class ="hljs-keyword "> with</ span > wave.open(< span class ="hljs-string "> '<path>'</ span > , ... ) < span class ="hljs-keyword "> as</ span > wave_file: ...
1098
+ < div > < h4 id ="listofexistingcontextmanagers "> List of existing context managers:</ h4 > < pre > < code class ="python language-python hljs "> < span class ="hljs-keyword "> with</ span > open(< span class ="hljs-string "> '<path>'</ span > ) < span class ="hljs-keyword "> as</ span > file: ...
1099
+ < span class ="hljs-keyword "> with</ span > wave.open(< span class ="hljs-string "> '<path>'</ span > ) < span class ="hljs-keyword "> as</ span > wave_file: ...
1100
1100
< span class ="hljs-keyword "> with</ span > memoryview(<bytes/bytearray/array>) < span class ="hljs-keyword "> as</ span > view: ...
1101
1101
db = sqlite3.connect(< span class ="hljs-string "> '<path>'</ span > ); < span class ="hljs-keyword "> with</ span > db: db.execute(< span class ="hljs-string "> '<insert_query>'</ span > )
1102
1102
lock = threading.RLock(); < span class ="hljs-keyword "> with</ span > lock: ...
You can’t perform that action at this time.
0 commit comments