<[EMAIL PROTECTED]> wrote: ... > cookbook recipies of which there are already several good > collections, but shorter things like, copy(sequence) is spelled > "sequence[:]".
No way: >>> from collections import deque >>> d=deque([1,2,3]) >>> d[:] Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: sequence index must be integer >>> deque(d) deque([1, 2, 3]) >>> I.e., NOT all sequences implement the unreadable x[:] form. The way that DOES work with all sequences is typeyouwant(sequence). Alex -- http://mail.python.org/mailman/listinfo/python-list