summaryrefslogtreecommitdiffstats
path: root/Lib/turtle.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/turtle.py')
-rw-r--r--Lib/turtle.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/turtle.py b/Lib/turtle.py
index 6f06059..5185f3c 100644
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -169,9 +169,8 @@ _CFG = {"width" : 0.5, # Screen
def config_dict(filename):
"""Convert content of config-file into dictionary."""
- f = open(filename, "r")
- cfglines = f.readlines()
- f.close()
+ with open(filename, "r") as f:
+ cfglines = f.readlines()
cfgdict = {}
for line in cfglines:
line = line.strip()