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/2001-September/017490.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 typesTim Peters tim.one@home.com
Wed, 12 Sep 2001 01:52:37 -0400
[Guido]
> ...
> Because it returns a borrowed value, PyDict_GetItem can't safely be
> fixed to check for this and call the __getitem__ slot.

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?

hard-to-approve-of-users<wink>-ly y'rs  - tim




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