Should we deprecate comma?

bearophile bearophile at HUGS
Mon Mar 24 06:46:10 PDT 2014


Russel Winder:

> But note that:
>
> [1,]       => 1-length list
> [1, 2,]    => 2-length list
> [1, 2, 3,] => 2-length list
>
> Do not underestimate the power of allowed trailing commas.

In Python it's ignored:

>>> [1,]
[1]
>>> [1, 2,]
[1, 2]
>>> [1, 2, 3,]
[1, 2, 3]

Bye,
bearophile


More information about the Digitalmars-d mailing list