[docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists
report at bugs.python.org
Thu May 17 18:56:10 CEST 2012
New submission from Zachary Ware <zachary.ware at gmail.com>:
I was looking through the documentation source files for things I might be able to fix, and stumbled across "XXX Add a bit on the difference between tuples and lists." in Doc\tutorial\datastructures.rst. So I took a stab at adding some prose to address that comment, reproduced here:
Though tuples may seem very similar to lists, their immutability makes them
ideal for fundamentally different usage. In typical usage, tuples are a
heterogenous structure, whereas lists are a homogenous sequence. This tends to
mean that, in general, tuples are used as a cohesive unit while lists are used
one member at a time.
Have I missed anything important (like the whole point) or is there anything I could phrase better?
Should this be applied to the tutorials of previous versions?
assignee: docs at python
files: tuple vs list.patch
nosy: docs at python, zach.ware
title: Tutorial: Add a bit on the difference between tuples and lists
versions: Python 3.3
Added file: http://bugs.python.org/file25627/tuple vs list.patch
Python tracker <report at bugs.python.org>
More information about the docs