Re: [pypy-dev] Compat. in 1.4.1 __del__
On 2/8/11 9:25 PM, Philip Jenvey wrote:
On Feb 5, 2011, at 9:04 PM, Dino Viehland wrote:
Christianwrote:
Howdy,
studying the differences of PyPy vs. CPython, most seem to be fine; one thing where I an unsure is the __del__ behavior.
I am not addressing its delayed call or the number it is called, this is similar to Jython and IronPython.
But assigning to __del__ after a class is created, is that so hard to implement? IronPython also doesn't handle assigning to __del__ after the class is created, and I'd be surprised if Jython did as well. To make this work we'd need to maintain a weak reference for every object of a user defined type and I think most users would rather not pay that expense for such a corner case. I've also never actually heard of this breaking compatibility anywhere. Jython doesn't either. We've been meaning to add the same warning PyPy does when you create a __del__ after the fact.
The feature is simply not worth the effort.
-- Philip Jenvey
Fine with me! I just wanted to know the reasons why this is more problematic than I thought. Thanks to all who replied. cheers - chris -- Christian Tismer :^)<mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
participants (1)
-
Christian Tismer