> Same here. I wouldnot vote to make strings or tuples or any other > tiny type weak-reffed in the first place. > Instead I would add the possible support to derived types, via > the __slot__ mechanism for instance. > There is a little coding necessary to make the generic code > handle the case of var-sized objects, but this is doable > and not very complicated. > > This may be really needed or not. if we can create the rule > "every derived type *can* have weak-refs", this is simpler > to memorize than "well, most can, some cannot". With some (considerable?) effort, slots on var-sized objects can certainly be supported -- the same approach as used for __dict__ should work. I expect it might slow down the normal case a bit, unless you define a new descriptor type just for this. --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