As Guido says

This commit is contained in:
Christian Heimes 2008-02-28 22:21:11 +00:00
parent c06950ee96
commit 36d1f8ec46
1 changed files with 2 additions and 2 deletions

View File

@ -394,9 +394,9 @@ class _TemporaryFileWrapper:
self.file.__enter__() self.file.__enter__()
return self return self
# XXX iter() doesn't use __getattr__ to find the __iter__ method # iter() doesn't use __getattr__ to find the __iter__ method
def __iter__(self): def __iter__(self):
return self.__getattr__('__iter__')() return iter(self.file)
# NT provides delete-on-close as a primitive, so we don't need # NT provides delete-on-close as a primitive, so we don't need
# the wrapper to do anything special. We still use it so that # the wrapper to do anything special. We still use it so that