What's the neatest way of getting dictionary entries in a specified order?
torriem at gmail.com
Sat Mar 11 09:21:28 EST 2017
On 03/11/2017 03:07 AM, Chris Green wrote:
> The order I was asking about was the order of the *fields* of the
> heading (i.e. the column names) *not* the data. It won't get updated
> when new data is added. What I was after (and got) was a way that
> would allow me to extract the data for one entry in my address book in
> a particular order.
Ahh. Now that's something I did not get out of the original message.
Apparently others did, though, since they talked about ordered dicts.
The order of the displayed fields is usually something set by the GUI
API when you create the table widget. At least in most toolkits I'm
familiar with. As well, when you add the row to the widget, you
normally specify the fields (the data) individually, so I would think
the order of the dict's fields does not matter since you'd manually
specify each field's data.
More information about the Python-list