Re: Deterministic destruction and RAII idioms in Python




<plahey@xxxxxxxxxxxxxxxxxx> wrote in message
news:1138652299.351951.36780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 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



.



Relevant Pages

  • Re: Does Python really follow its philosophy of "Readability counts"?
    ... with enforcing that "shouldn't" in the language itself? ... In Python, direct access to pointers is a MUST NOT. ... where you are allowed to mess with the implementation. ... human assembly language programmers? ...
    (comp.lang.python)
  • Re: Basic inheritance question
    ... used 'this' in C++ and Java. ... but in Python it doesn't. ... language, they would write a lot of ten liners that is changed a LOT ... Add three levels of inheritence and a couple globals and you'll find out ...
    (comp.lang.python)
  • Re: Python for Fortran programmers
    ... proposition for Python in the Fortran community", ... compiled language such as Fortran or C++, but I would still prefer to ... greater number of programming errors that are typically detected by a ...
    (comp.lang.fortran)
  • Re: Pythons simplicity philosophy
    ... the correct Python idiom, ''.join. ... However, if you agree with Paul Graham's theories on language design, ... 'sum' itself lost substantial generality between my original ...
    (comp.lang.python)
  • Re: Is there a "Large Scale Python Software Design" ?
    ... around 20 developers, assuming colocation... ... situation with Python, yet, only with Fortran, C, C++. ... It sure beats "retrofitting" unit tests post facto. ... Jones' estimates for Java's language level; ...
    (comp.lang.python)