On Tue, Dec 22, 2009 at 9:52 PM, Roshan Mathews <rmath...@gmail.com> wrote:

> [..]
>
> http://jtauber.com/blog/2006/04/15/python_tuples_are_not_just_constant_lists/
>    Tuples are not constant lists -- this is a common
>    misconception. Lists are intended to be homogeneous
>    sequences, while tuples are hetereogeneous data
>    structures.[..]


 This is an 'intention' rather than an enforced rule isn't it? It does seem
natural though. I don't think i've ever seen a tuple with elements of
different types.

My thumb rule is if you need an immutable structure (often for a dictionary
key), use a tuple. Otherwise, use a list.


-- 
~noufal
http://nibrahim.net.in
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to