As Guido says

This commit is contained in:
Christian Heimes 2008-02-28 22:21:11 +00:00
parent c06950ee96
commit 36d1f8ec46

View file

@ -394,9 +394,9 @@ def __enter__(self):
self.file.__enter__()
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):
return self.__getattr__('__iter__')()
return iter(self.file)
# 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