mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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).
This commit is contained in:
parent
74311b2c27
commit
6b708d569c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue