def __init__(self):

Ian Kelly ian.g.kelly at gmail.com
Tue Apr 26 13:26:46 EDT 2016


On Tue, Apr 26, 2016 at 11:13 AM, Chris Kaynor <ckaynor at zindagigames.com> wrote:
> Yah, if you really wanted to make it work properly, you'd need to incref
> the newValue, while decref the oldValue. The incref would not be that
> difficult, but the decref would be more challenging, as you may have to
> also destroy the old object, though that might be possible by casting it
> back to a python object without the incref,. One way or the other, I did
> not exactly spend a ton of time to make it work properly :)

For the decref I'd probably just decrement it and leave it; if it's
zero, the garbage collector will eventually take care of it.



More information about the Python-list mailing list