Hrvoje Nikšic <hrvoje.niksic at avl.com> wrote: > > I propose modifying PyString_InternInPlace to better cope with string > subtype instances. Any particular reason why the following won't work for you? _interned = {} def intern(st): #add optional type checking here if st not in _interned: _interned[st] = st return _interned[st] If I remember the implementation of intern correctly, that's more or less what happens under the covers. - Josiah
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