"Overwriting" a parent slot doesn't flush cache
Brought to you by:
tlilley
Overwriting a parent slot (see sample below) doesn't flush the cache of slots brought down from the parent being overwritten:
p1 = proto\( \)
\# add some slots
p2 = proto\( \)
\# add some slots
c = proto\( \)
c.isa\_p = p1
\# call some slots from p1
At this point, slots from p1 are cached in c's __dict__. Now:
c.isa\_p = p2
The slots from p1 are still cached in c's __dict__, even though p1 is no longer a parent (at least via slot "isa_p").