Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Are ordered hashes useful?



Changing the Subject, because I'm changing the subject.

Josh Glover writes:

 > Ruby has a hash that keeps the keys FIFO ordered, if that makes sense.
 > The first key you put in is the first key that
 > GoogleOnlyKnowsTheNameOfTheHashClass#keys will return.

This has recently been proposed for Python, but the consensus so far
is that it's not very useful by itself.  It doesn't quite do the right
thing when used as a dictionary for keeping keyword arguments AIUI,
which is the most common proposed use for a "bare" FIFO hash at
python-dev.  (The people who want this are probably trying to solve
Dave's problem in an elegant way, in fact, now that you remind me of
the idea of ordered hash.)

Do you know of any use cases for it?


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links