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/2004-May/045008.html below:

[Python-Dev] Why aren't more things weak referencable

[Python-Dev] Why aren't more things weak referencablePhillip J. Eby pje at telecommunity.com
Sun May 30 01:34:46 EDT 2004
At 01:24 AM 5/30/04 -0400, Bob Ippolito wrote:
>On May 29, 2004, at 1:06 PM, Raymond Hettinger wrote:
>
>>Instances of classes inheriting from str, tuple, etc cannot be weakly 
>>referenced.  Does anyone know the reason for this?
>
>They can not accept non-empty __slots__ either, which is probably closer 
>to the source of the problem.  I have no idea what the reason is.  I 
>imagine it's something to do with optimization, and/or because they are 
>immutable.

More likely, because they are variably-sized, and their variably-sized 
portions are at fixed offsets.  (OTOH, I don't see why their subclasses can 
still have a __dict__ slot, then...)


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