Range Operation pre-PEP

David Bolen db3l at fitlinxx.com
Sun May 13 01:56:52 CEST 2001


Douglas Alan <nessus at mit.edu> writes:

> I made a *very* simple statement: tuples *are* full-fledged immutable
> sequences in Python, and therefore it is fair and often useful to
> treat them as full-fledged immutable sequences.

And using the above to try to jump back to the core question that
started this, have we at least resolved that tuples are in fact
treated by Python as full-fledged immutable sequences?

That is, methods such as count() and index() are not directly relevant
to that question because those methods are not part of Python's
immutable-sequence-type (strings and tuples) interface, but
mutable-sequence-type (lists) specific methods.  Some further details
on this can be found in 2.1.5 of the library reference and 3.3.4/3.3.5
of the language reference.

Of course the debate can then shift to what should or shouldn't be
part of the base immutable-sequence-type interface, but that's
distinct from saying that tuples aren't already treated fully as in
that category according to its current Python definition.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list