Missing the functional mind set

Daniel Klein danielk at aracnet.com
Sat Mar 3 13:53:31 EST 2001


On Sat, 03 Mar 2001 18:22:18 GMT, "Rainer Deyke" <root at rainerdeyke.com> wrote:

>But if you are indexing with integers from 0 to n, why are you using a
>dictionary in the first place?

I'm not sure I understand your question. I need the dictionary to associate a
numbered key with a value. Rather than force the user to enter elements 'in
order' I am letting them specify what the order is on-the-fly, ie enter element
3 first, then 1, then 2, then 0. The method will the place the values in the
proper order for further processing.

Is there a better approach?

Daniel Klein




More information about the Python-list mailing list