On Thu, Nov 06, 2003, Delaney, Timothy C (Timothy) wrote: > From: Neal Norwitz [mailto:neal at metaslash.com] >> >> For the most part, I meant to remove them (including intern) >> altogether in the long run. In 2.4, I only meant to officially >> deprecate them with a warning. intern() doesn't seem particularly >> useful or commonly used. At least moving it to sys or some other >> module is an improvement IMO. > > One reason why intern() hasn't been commonly used is that it made > things immortal. This is no longer the case - I'd like to see if the > use of intern() changes. > > What I would prefer would be for intern() to be able to take any > hashable object - in particular, tuples. It's not uncommon for me to > create lots of small tuples which end up having the same data in them > - interning could save quite a bit of memory. > > Yes, I can fake it with my own interning function, but that then means > I have to deal with the immortality problems again. > > So I'd actually advocate enhancing intern(), rather than removing it, > now that interned things are mortal. Agreed. But intern() should *not* be a builtin function. It belongs in sys. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "It is easier to optimize correct code than to correct optimized code." --Bill Harlan
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