A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-August/141326.html below:

[Python-Dev] tp_finalize vs tp_del sematics

[Python-Dev] tp_finalize vs tp_del sematics [Python-Dev] tp_finalize vs tp_del sematicsArmin Rigo arigo at tunes.org
Sun Aug 23 14:14:54 CEST 2015
Hi Valentine,

On 19 August 2015 at 09:53, Valentine Sinitsyn
<valentine.sinitsyn at gmail.com> wrote:
> why it wasn't possible to
> implement proposed CI disposal scheme on top of tp_del?

I'm replying here as best as I understand the situation, which might
be incomplete or wrong.

>From the point of view of someone writing a C extension module, both
tp_del and tp_finalize are called with the same guarantee that the
object is still valid at that point.  The difference is only that the
presence of tp_del prevents the object from being collected at all if
it is part of a cycle.  Maybe the same could have been done without
duplicating the function pointer (tp_del + tp_finalize) with a
Py_TPFLAGS_DEL_EVEN_IN_A_CYCLE.


A bientôt,

Armin.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4