Skip to content

Commit 3fb6af3

Browse files
committed
Use with, it's idiomatic
1 parent 224d9f4 commit 3fb6af3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

html5lib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
Example usage::
88
99
import html5lib
10-
f = open("my_document.html")
11-
tree = html5lib.parse(f)
10+
with open("my_document.html") as f:
11+
tree = html5lib.parse(f)
1212
"""
1313

1414
from __future__ import absolute_import, division, unicode_literals

0 commit comments

Comments
 (0)