Kaydet (Commit) 6b708d56 authored tarafından Guido van Rossum's avatar Guido van Rossum

In class TemporaryFileWrapper, don't cache attributes of tpye int --

these happen to be 'closed' and 'softspace', which may change!

Noted by Dave Ascher (with slightly different solution).
üst 74311b2c
......@@ -120,7 +120,8 @@ class TemporaryFileWrapper:
def __getattr__(self, name):
file = self.__dict__['file']
a = getattr(file, name)
setattr(self, name, a)
if type(a) != type(0):
setattr(self, name, a)
return a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment