[Python-ideas] iterable.__unpack__ method
Jan Kaliszewski
zuo at chopin.edu.pl
Mon Feb 25 13:45:50 CET 2013
24.02.2013 07:24, Guido van Rossum wrote:
[...]
> And to me the ... Looks too much like something that consumes the
> rest, rather than leaving it.
To me either. And we already have the syntax for consuming the rest:
a, b, *seq = iterable
But maybe it could be extended to include the following variant:
a, b, *() = iterable
-- expressing the "leave the rest untouched" behaviour? Doesn't such
an empty-tuple-literal-like syntax suggest strongly enough that
no items are consumed?
Cheers.
*j
More information about the Python-ideas
mailing list