On May 21, 2006, at 2:23 PM, Collin Winter wrote:
> This is something I've been meaning to bring up: if we're serious
> about the "tuples = fixed-length collections, lists = unknown-length
> collections" distinction, then the CPython core should switch over to
> this mindset as well.

Although lists are *often* used for unknown-length ordered homogenous  
collections, and tuples are *often* used for fixed-length  
heterogeneous collections, I think it would be a mistake to try to  
define them this way.  In particular, there is at least one other  
important difference between tuples and lists: mutability.  If you  
need to use an unknown-length sequence as a key, then it's very  
natural to use a tuple.  And if you want a fixed-length heterogeneous  
collection that's mutable, then it's natural to use a list.

-Edward

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to