[Twisted-Python] What rough protocol, its hour come at last, slouches towards Austin to be born?
Daniel Mahler
mahler at cyc.com
Mon Apr 8 19:54:10 EDT 2002
I believe common meaning of "tuple" extends beyond computing
and means something like element of the cartesian product.
The dictionary definition below seems to come from a computing
dictionary and assumes a strongly typed language.
The online Merriam-Webster just says:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
One entry found for -tuple.
Main Entry: -tu·ple
Pronunciation: "t&-p&l, "tü-
Function: noun combining form
Etymology: quintuple, sextuple
: set of (so many) elements -- usually used of sets with ordered
elements <the ordered 2-tuple (a, b)>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Which seems compatible with Python usage.
I think the Python usage is consistent with
programming/math uses I am familiar with.
It is even consistent with the dictionary definition
given below;
it is the definition 'list' that is incompatible,
since there is no same type restriction
on python list elements.
However, all untyped/dynamically typed languages
have list types without it.
However, in most languages lists are linked structures:
python lists correspond to vectors/arrays in other languages.
D
Glyph Lefkowitz writes:
> On Mon, 2002-04-08 at 17:53, Bob Ippolito wrote:
> >
> > On Monday, April 8, 2002, at 06:08 PM, Glyph Lefkowitz wrote:
>
> > > 1: use of the word "tuple".
>
> > I'd say that tuple is pretty standard terminology. It's used quite
> > heavily in PostgreSQL's source code for example, and I've heard mention
> > of it in reference to common lisp.. Other things probably use it, I
> > don't think it had anything to do with python, I think python's use of
> > it is just the most prolific.
>
> dictionaries define "tuple" as:
>
> "In functional languages, a data object containing two or more
> components. Also known as a product type or pair, triple, quad, etc.
> Tuples of different sizes have different types, in contrast to lists
> where the type is independent of the length. The components of a
> tuple may be of different types whereas all elements of a list have
> the same type."
>
> This is not quite what Python means. PostgreSQL defines tuple as:
>
> "an individual state of a row; each UPDATE of a row creates a new
> tuple for the same logical row".
>
> In Python, it means simply "a list which is immutable". I think that
> these three definitions are sufficiently incompatible that one should
> not use the word in a vocabulary for a protocol which is supposed to be
> cross-langauge.
>
> --
> | <`'> | Glyph Lefkowitz: Travelling Sorcerer |
> | < _/ > | Lead Developer, the Twisted project |
> | < ___/ > | http://www.twistedmatrix.com |
More information about the Twisted-Python
mailing list