1
0
forked from VimPlug/jedi

Understand context managers correctly

Fixes #812.
This commit is contained in:
Dave Halter
2017-09-13 11:00:10 +02:00
parent 5ff7e3dbbe
commit 4c2d1ea7e7
4 changed files with 21 additions and 1 deletions
+3
View File
@@ -39,6 +39,9 @@ class file():
def readlines(self):
return ['']
def __enter__(self):
return self
class xrange():
# Attention: this function doesn't exist in Py3k (there it is range).
+3
View File
@@ -7,3 +7,6 @@ class TextIOWrapper():
def readlines(self):
return ['']
def __enter__(self):
return self