tuple.index()

Simon Brunning simon at brunningonline.net
Fri Dec 15 10:28:45 EST 2006


On 12/15/06, Christoph Zwerschke <cito at online.de> wrote:
> Maybe there would be less dispute if this dogma/convention(?) "Tuples
> are for heterogeneous data, list are for homogeneous data" would be
> written down somewhere in the tutorial, reference or in PEP8, so people
> would be aware of it.

It's not a dogma. It's just that it explains the intention behind the
designs of the tuple and list APIs. If you use them for thier intended
purposes, naturally you'll find the APIs more helpful.

But you won't find the data-structure police breaking down your doors
in the small hours if you choose to go your own way[1]. I can use a
spreadsheet to write a letter if I want to - but it would be foolish
to complain that the word wrapping was a bit dodgy.

-- 
Cheers,
Simon B
simon at brunningonline.net

[1] The PSU, on the other hand, Mi%_$@-£+%(



More information about the Python-list mailing list