Tuple assignment

bearophile bearophileHUGS at lycos.com
Fri Oct 8 13:11:53 PDT 2010


Juanjo Alvarez:

> What is exactly false on what I said?

This syntax you have explained doesn't do what you think it does:
a, b, c, _ = ('tuple', 'of', 'three')
See:
http://ideone.com/LG1De

The _ is just the name of a normal identifier (in the interactive shell it refers to the last result).

Bye,
bearophile


More information about the Digitalmars-d mailing list