From 36d1f8ec46b3f7982578381fb5378673c0456e43 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 28 Feb 2008 22:21:11 +0000 Subject: As Guido says --- Lib/tempfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/tempfile.py b/Lib/tempfile.py index 11a4c60..df1317d 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 -- cgit v0.12