I'm hoping someone can point out where I'm going wrong here. Here's a snippet of a Python interactive session (2.3, if it makes a difference):
-------------------------------------- >>> class X(list): ... def __init__(self, n): ... v = range(n) ... list.__init__(self, v) ... >>> x = X(10) >>> x [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> class Y(tuple): ... def __init__(self, n): ... v = tuple(range(n)) ... tuple.__init__(self, v) ... >>> y = Y(10) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: iteration over non-sequence -------------------------------------- How do I initialize instances of a class derived from tuple, if it's not in the __init__ method? Thanks for any help! Dave Opstad -- http://mail.python.org/mailman/listinfo/python-list