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/2016-March/143577.html below:

[Python-Dev] Counting references to Py_None

[Python-Dev] Counting references to Py_None [Python-Dev] Counting references to Py_NoneArmin Rigo arigo at tunes.org
Mon Mar 21 17:42:46 EDT 2016
Hi,

On 20 March 2016 at 18:10, Brett Cannon <brett at python.org> wrote:
> And if we didn't keep its count accurately it would eventually hit
> zero and constantly have its dealloc function checked for.

I think the idea is really consistency.  If we wanted to avoid all
"Py_INCREF(Py_None);", it would be possible: we could let the refcount
of None decrement to zero, at which point its deallocator is called;
but this deallocator can simply bumps the refcount to a large value
again.  The deallocator would end up being called very rarely.


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