to close or not to close?

François Pinard pinard at iro.umontreal.ca
Tue Aug 1 08:55:46 EDT 2000


[Tim Peters]

> [...] CPython happens to use reference-counting to reclaim dead objects,
> so in CPython destruction happens[...] immediately upon the loss of
> the last reference.  [...]  But, so far, CPython is the only Python
> implementation that enjoys this behavior.  JPython does not, John
> Skaller's Vyper does not, and AFAIK the MS-based Python .NET will not.

That's why CPython allows for a writing style which I find both much cleaner
and clearer than with other implementations, in my opinion.  If I could
not rely on this, I would have the feeling of loosing a very good thing.
It would be sad if Python was loosing this feature, and it is definitely sad
that the language specification left it undefined.  Maybe it was some kind
of Guido's pre-calculated, perverse way to ensure CPython stays a superior
implementation (by allowing for the laziness of other implementors)? :-) :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list