From b2fdaa79e881edfd9f0c8e0df94f5854c4854c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 21 Jul 2019 01:42:24 +0200 Subject: [PATCH] Context manager --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5787404..cb2f45b 100644 --- a/README.md +++ b/README.md @@ -1167,8 +1167,8 @@ Hello World! #### List of existing context managers: ```python -with open('', ...) as file: ... -with wave.open('', ...) as wave_file: ... +with open('') as file: ... +with wave.open('') as wave_file: ... with memoryview() as view: ... db = sqlite3.connect(''); with db: db.execute('') lock = threading.RLock(); with lock: ... diff --git a/index.html b/index.html index a33cefb..34275e1 100644 --- a/index.html +++ b/index.html @@ -1095,8 +1095,8 @@ Z = dataclasses.make_dataclass('Z', [... print(file.read()) Hello World! -

List of existing context managers:

with open('<path>', ...) as file: ...
-with wave.open('<path>', ...) as wave_file: ...
+

List of existing context managers:

with open('<path>') as file: ...
+with wave.open('<path>') as wave_file: ...
 with memoryview(<bytes/bytearray/array>) as view: ...
 db = sqlite3.connect('<path>'); with db: db.execute('<insert_query>')
 lock = threading.RLock(); with lock: ...