From: Christian Heimes Date: Thu, 28 Feb 2008 22:21:11 +0000 (+0000) Subject: As Guido says X-Git-Tag: v3.0a3~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36d1f8ec46b3f7982578381fb5378673c0456e43;p=python As Guido says --- diff --git a/Lib/tempfile.py b/Lib/tempfile.py index 11a4c60e2d..df1317d587 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -394,9 +394,9 @@ class _TemporaryFileWrapper: 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