You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type cache can expose previous values during finalization of an object #118492
This should always print True, that is an attribute accessed from a class should match the value that's in the type's mappingproxy:
classX:
def__del__(inner_self):
v=C.aprint(v==C.__dict__['a'])
classC:
a=X()
# prime the cacheC.aC.a# destructor shouldn't be able to see inconsisent stateC.a=X()
C.a=X()
But this prints False because the destructor can be run when the assignment into the type dict occurs, but before the type version is invalidated.
Activity