In article <[EMAIL PROTECTED]>, Roy Smith <[EMAIL PROTECTED]> wrote: > >The point is that you're forced to use lists to compute the sub-sequences. >This makes sense, because lists fit the "indefinite length sequence" idea. >Then, you're forced to use tuples as the dictionary keys, because tuples >are immutable/hashable, while lists are not. This use of tuples doesn't >fit the "inherently fixed-sized collection of heterogeneous objects" idea >of a tuple. In this case, a tuple really is just an immutable list. Your >choice of containers is not based on any theoretical arguments of what each >type was intended to represent, but the cold hard reality of what >operations they support.
Note that one can, of course, write Python classes that do exactly what you want. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "It is easier to optimize correct code than to correct optimized code." --Bill Harlan -- http://mail.python.org/mailman/listinfo/python-list