A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-September/017491.html below:

[Python-Dev] Free threading and borrowing references from mutable types

[Python-Dev] Free threading and borrowing references from mutable types [Python-Dev] Free threading and borrowing references from mutable typesGuido van Rossum guido@python.org
Wed, 12 Sep 2001 09:43:56 -0400
> [Guido]
> > ...
> > Because it returns a borrowed value, PyDict_GetItem can't safely be
> > fixed to check for this and call the __getitem__ slot.

[Tim]
> If PyDict_GetItem ended up calling a non-genuine-dict __getitem__ slot, what
> would stop it from decref'ing the result in that case before returning it
> (thus returning a borrowed reference even so)?  That __getitem__ may
> synthesize a result object with a refcount of 1?

Exactly.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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