![]() |
|
|
+ Search |
![]()
|
May 16th, 2000 07:17
unknown unknown, Gordon McMillan
It should incref the attribute and leave the owner alone. Imagine a sequence like this: newref = a.b # here's your __getattr__ a = None Now a's refcount drops. If it drops to 0, it gets deallocated, which will decref b. Without an incref in __getattr__, the user would have an invalid reference.