I somehow missed this before. I like most of the additions from Raymond Hettinger. But the api on this baffles me a bit:
>>> d = OrderedDict.fromkeys('abcde') >>> d.move_to_end('b', last=False) >>> ''.join(d.keys) 'bacde' I understand that "end" could potentially mean either end, but would "move_to_end" and "move_to_beginning" not have been clearer? -- http://mail.python.org/mailman/listinfo/python-list