Tuple question

Arthur ajsiegel at optonline.com
Fri Sep 3 07:25:30 EDT 2004


"Donn Cave" <donn at drizzle.com> wrote in message
news:1094189336.822541 at yasure...

> No one is saying you must use a list then.  Do whatever you want!
> But no one is forcing you to use a tuple, either (in this hypothetical
> application), and if you need an index function, you know where to get
>it.

Which to me, is what it boils down to.  What are you trying to do, and
where's the fit.  At a very practical level.  I continue to think any
general discussion of homogeneity/heterogenuity is misdirecting.  Python
relies on lists to be able to do duty in many different kinds of
circumstances, as oppose to acccessing specialized containers, as in other
languages.  Clearly, in some of those circumstances homogeneity, in some
sense or other, is to the essence.  In others it clearly is not.  It's the
append method one is after, for example. In a dynamic app, append and
ordered access solves a set of problems that may or may not be reasonablely
conceptualized as related to homogeneity. So any attempt to describe
anything about lists vs. tuples in terms of its data content always in the
end seems unnecessarily reductionist, IMO - if that's the right word.

Art





More information about the Python-list mailing list