News for hackers. Stuff that matters.
Re:Python dicts are now ordered by tylerjwilk00 on Friday February 07, 2020 @02:33PM (#22269861)
I have to disagree also.

The order inserted makes most sense in most cases. Hand crafting integer based array indexes out of order is rare. And as you say a simple ksort call guarantees sort order.

    ksort($arr);
    echo join($arr, ", ");
    // one, two, three
Re:Python dicts are now ordered by dpacmittal on Friday February 07, 2020 @02:41PM (#22269985)
Exactly. Of you hand craft an array you probably need it in that order.
Re:Python dicts are now ordered by tylerjwilk00 on Friday February 07, 2020 @02:56PM (#22270171)
Then why not put it in order while you're hand crafting it?