Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The point OP is making is that none of these statements will guarantee the order of insertion, since OrderedDict must take the variadic kwargs input as a dict, which is inherently unordered. You have to use a list of tuples.


Yes, agree, just wanted to give the correct Python for the (still) ill attempt at traversing OrderedDict keys in order.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: