[Python-Dev] I think my set module is ready for prime time; comments?
Guido van Rossum
Wed, 24 Jan 2001 10:41:07 -0500
> > 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/)