On Fri, Jan 6, 2012 at 9:06 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Fri, Jan 6, 2012 at 6:40 AM, Ulrich Eckhardt > <ulrich.eckha...@dominolaser.com> wrote: >> Nonetheless, I'm still wondering if I could somehow replace the dict with an >> OrderedDict. > > In Python 3, yes. This is pretty much the entire use case for the new > __prepare__ method of metaclasses. See the "OrderedClass" example at: > http://docs.python.org/py3k/reference/datamodel.html#special-method-names
That link should be: http://docs.python.org/py3k/reference/datamodel.html#customizing-class-creation -- http://mail.python.org/mailman/listinfo/python-list