Tim Peters wrote:
>
> I can't think of a Python feature with a higher aggregate
> braincell_burned / benefit ratio than __del__ methods. If P3K retains
> them-- or maybe even before --we should consider taking "the Java
> dodge" on this one. That is, decree that henceforth a __del__ method
> wil
[Brett Cannon]
> Wasn't there talk of getting rid of __del__ a little while ago and
> instead use weakrefs to functions to handle cleaning up?
There was from me, yes, with an eye toward P3K.
> Is that still feasible?
It never was, really. The combination of finalizers, cycles and
resurrection i
[Tim Peters]
>> If P3K retains them [__del__]-- or maybe even before --we should
>> consider taking "the Java dodge" on this one. That is, decree that
>> henceforth a __del__ method will get invoked by magic at most
>> once on any given object O, no matter how often O is resurrected.
[Phillip J.
On 8/8/05, Tim Peters <[EMAIL PROTECTED]> wrote:
> I can't think of a Python feature with a higher aggregate
> braincell_burned / benefit ratio than __del__ methods. If P3K retains
> them-- or maybe even before --we should consider taking "the Java
> dodge" on this one. That is, decree that henc
At 09:12 PM 8/8/2005 -0400, Tim Peters wrote:
>I can't think of a Python feature with a higher aggregate
>braincell_burned / benefit ratio than __del__ methods. If P3K retains
>them-- or maybe even before --we should consider taking "the Java
>dodge" on this one. That is, decree that henceforth a
On 8/8/05, Tim Peters <[EMAIL PROTECTED]> wrote:
> I can't think of a Python feature with a higher aggregate
> braincell_burned / benefit ratio than __del__ methods. If P3K retains
> them-- or maybe even before --we should consider taking "the Java
> dodge" on this one. That is, decree that hence
[Armin Rigo]
> There are various proposals to add an attribute on exception instances
> to store the traceback (see PEP 344). A detail not discussed, which I
> thought of historical interest only, is that today's exceptions try very
> hard to avoid reference cycles, in particular the cycle
>
> '
On 8/8/05, Armin Rigo <[EMAIL PROTECTED]> wrote:
> Attaching a __traceback__ will only make this "bug" show up more often,
> as the 'except Exception, e' line in a __del__() method would be enough
> to trigger it.
Hmm... We can blame this on __del__ as much as on __traceback__, of
course... But it
Hi,
On Mon, Aug 08, 2005 at 10:31:06AM +0200, Armin Rigo wrote:
> see the attached program...
Oups. Here it is...
Armin
import sys, time
def log(typ, val, tb):
pass
class X:
def __del__(self):
try:
typo
except Exception, e:
e_type, e_value, e_t
Hi all,
There are various proposals to add an attribute on exception instances
to store the traceback (see PEP 344). A detail not discussed, which I
thought of historical interest only, is that today's exceptions try very
hard to avoid reference cycles, in particular the cycle
'frame -> local
10 matches
Mail list logo