In Python the syntax to create 1-tuple is *(element,)*. Note the ",". It's not the most beautiful but is acceptable.
Christopher Skrzętnicki On Tue, Mar 11, 2008 at 12:24 AM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > Hi > > > I understand the lack of distinction between a unit type and a 0-tuple, > http://www.haskell.org/pipermail/ > > since they are isomorphic. > > It's more we pronounce 0-tuple as unit, they are identical. > > > But it is strange that there is no 1-tuple, > > since _|_ and the 1-tuple (_|_) would be different things entirely, no? > > Yes, it would be useful, but what would the syntax be? (x) already > means something else - namely grouping. Yhc defines both Tuple1 and > _E, both of which are the 1-tuple. I'd like it if there was a standard > definition Box for the 1-tuple, in the base libraries. >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe