summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-02-28 22:21:11 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-02-28 22:21:11 (GMT)
commit36d1f8ec46b3f7982578381fb5378673c0456e43 (patch)
tree4c928d98530fe4a98fd06d0055c1d1ee86700ddc
parentc06950ee967a26071510f6ded04f1543989ad6b9 (diff)
downloadcpython-36d1f8ec46b3f7982578381fb5378673c0456e43.zip
cpython-36d1f8ec46b3f7982578381fb5378673c0456e43.tar.gz
cpython-36d1f8ec46b3f7982578381fb5378673c0456e43.tar.bz2
As Guido says
-rw-r--r--Lib/tempfile.py4
1 files 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