Passing a callable object to Thread

Paul Rubin http
Sat Feb 16 06:40:48 CET 2008


Jeff Schwab <jeff at schwabcenter.com> writes:
> > The idea is that a 2-tuple (of numbers, say) is a pair of numbers, a
> > 3-tuple is three numbers, and a 1-tuple is one number.  That would
> > mean a number and a 1-tuple of numbers are the same thing, not
> > separate types.
> 
> No, that doesn't follow.  

It doesn't follow in the sense of being an unavoidable consequence
of something, it's just a plausible interpretation which is in fact
widely used.

> > This is how most type systems treat tuples.
> I take it you have particular systems in mind, but I've never used a
> programming language that works that way.

Basically the entire class of typed functional languages, I believe.

> That "oddness" has nothing to do with tuples-of-one being strange, nor
> does it imply that tuples are fundamentally different from other
> collection types.

The oddness is that most other languages (at least those that I know
of) that have tuples, treat them as product types and not as
collection types.



More information about the Python-list mailing list