> > This could be incorporated into PyDict. Instead of storing keys and > > values in the same array, keep them in separate arrays and only > > allocate the values array the first time someone stores a value other > > than 1. > > Cool idea, but even cooler (would catch more idioms, that is) is > "the first time someone stores something not 'is' something in the ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > dict, allocate the values array". This would catch small numbers, > None and identifier-looking strings, for the measly cost of one > pointer/dict object. Sorry, but I don't understand what you mean by the ^^^ marked phrase. Can you please elaborate? Regarding storing one for "present", that's all well and fine, but it suggests to me that storing a false value could mean "not present". Do we really want that? --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