2013/9/20 Jesus Cea <jcea at jcea.es>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 20/09/13 15:44, Antoine Pitrou wrote: > >> Yes. The main difference is that sys.intern() will remove the >> interned strings when every external reference vanishes. It >> requires either weakref'ability (which both str and bytes lack) or >> special cooperation from the object destructor (which is why >> sys.intern() is restricted to str instead of working with arbitrary >> objects). > > Great comment. Thanks. > > Why str/bytes doesn't support weakrefs, beside memory use? Is increased memory use for every str/bytes object not a good enough reason? -- Regards, Benjamin
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