On Feb 22, 10:10 am, Peter Otten <__pete...@web.de> wrote: > Looks like invoking OrderedDict.__init__() is necessary: > > >>> from collections import OrderedDict > >>> class X(OrderedDict): > > ... def __init__(self, stuff): > ... super(X, self).__init__() > ... for k, v in stuff: > ... self[k] = v > ...>>> X([("a", "b"), ("c", "d")]) > > X([('a', 'b'), ('c', 'd')])
Thank you! That worked. Languages. Some of them automatically call the default base-class constructors, others don't. Apparently. -- http://mail.python.org/mailman/listinfo/python-list