Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c06950e commit 36d1f8eCopy full SHA for 36d1f8e
1 file changed
Lib/tempfile.py
@@ -394,9 +394,9 @@ def __enter__(self):
394
self.file.__enter__()
395
return self
396
397
- # XXX iter() doesn't use __getattr__ to find the __iter__ method
+ # iter() doesn't use __getattr__ to find the __iter__ method
398
def __iter__(self):
399
- return self.__getattr__('__iter__')()
+ return iter(self.file)
400
401
# NT provides delete-on-close as a primitive, so we don't need
402
# the wrapper to do anything special. We still use it so that
0 commit comments