POV-Ray : Newsgroups : povray.off-topic : Ocaml : Re: Ocaml Server Time
4 Sep 2024 17:24:36 EDT (-0400)
  Re: Ocaml  
From: Kevin Wampler
Date: 5 Feb 2010 17:27:56
Message: <4b6c9b6c$1@news.povray.org>
Darren New wrote:
> Not in Python. The cosntructor for a 2-tuple is ,
> No parens needed. Figure *that* one out. :-)

This isn't *quite* correct, since a single comma can construct either a 
1-tuple or a 2-tuple depending on how it's used:

"foo", --> 1-tuple
"foo",bar --> 2-tuple

It's probably best to view the tuple constructor as a comma, which can 
be used as a binary operator or as a unary postfix operator (ignoring 
3-n-tuples of course).


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.