Deterministic destruction and RAII idioms in Python

Terry Reedy tjreedy at
Mon Jan 30 23:14:14 CET 2006

<plahey at> wrote in message 
news:1138652299.351951.36780 at
> The problem is that other implementations of
> Python (Jython and IronPython) do not support deterministic
> destruction.  So we are left with a problem:  is deterministic
> destruction an implementation detail of CPython that can go away at
> anytime, or is it an official property of the language.

It is a reliable implementation detail of CPython that will not go away 
anytime soon.  For the language def, see the Reference Manual section of 
the del command.

> Giving up deterministic destruction in Python would be a real blow for
> me, since it is one of its unique features among GC'ed languages.
> So what's the deal, can I rely on it in "mainstream" Python or am
> I out of luck here?

Depends on what you mean by 'mainstream'.

Terry Jan Reedy

More information about the Python-list mailing list