<[EMAIL PROTECTED]> wrote: ... > under what circumstances do we need to create a copy of a tuple :-> > "btuple = atuple[:]". tuples are immutable, so wouldn't it be "wasting > memory"?
Nah -- btuple is atuple. The "copy" is a no-op, in this case. > another query, in the docs, list(a) and a[:] does the same thing (a = > [1,2,3] for example), but besides the speed of slicing is faster than > list(), what advantage is there for using list(a) in this case ? Readability (a word is more readable than idiomatic punctuation), and conceptual uniformity with making shallow copies of other containers of known types such as sets and dicts. Alex -- http://mail.python.org/mailman/listinfo/python-list