[Python-ideas] Proposal: New syntax for OrderedDict, maybe built-in
David Wilson
dw+python-ideas at hmmz.org
Thu Sep 4 20:18:53 CEST 2014
On Thu, Sep 04, 2014 at 08:11:10PM +0200, Norman Hooper wrote:
> I am not aware of any implementations (although I'm also not aware of all
> implementations) that do not preserve order.
$ jsc
>>> function keys(o) {
... var k = [];
... for(var key in o) k.push(key);
... return k;
... }
undefined
>>> keys({"5": 1, "4": 1})
4,5
David
More information about the Python-ideas
mailing list