__del__ problem - would adopting Garbage Collection fix this?
Tim Peters
tim_one at email.msn.com
Thu Apr 20 03:41:54 EDT 2000
[Neil Schemenauer]
> With the default debugging options the collector prints a message to
> sys.stderr when it finds uncollectable objects. Redesigning the
> class structure should fix the problem.
[Just van Rossum]
> Maybe you're right, but to me it feels this is in the exact same category
> as a __del__ exception, so ignoring & collecting seems more logical to me
> as a default.
Except this isn't Fortran <0.5 wink>: "in the face of ambiguity, refuse the
temptation to guess" is the Python Way. That exceptions in __del__ are
diseased is no excuse for designing illness into more areas. If you don't
want the msg, don't write sick code!
even-five-year-olds-understand-they're-supposed-to-clean-up-their-
own-mess<wink>-ly y'rs - tim
More information about the Python-list
mailing list