tuple (TypeTuple kind) multi-initialization. Actually documented?

bearophile bearophileHUGS at lycos.com
Mon Mar 31 14:09:31 PDT 2014


> No language that I know (Haskell, Rust, F#, Python, and more) 
> that has tuples supports the initialization of a n-tuple with a 
> scalar value.

In Python there is a way to build a n-tuple from a 1-tuple, but 
the seed is not a scalar, and this is an explicit syntax:

>>> (5,) * 3
(5, 5, 5)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list