Hi
Some have liked adding a new syntax a, b, ... = iterable
to mean consume two items from the iterable. However,
a, b, Ellipsis = iterable
has a different meaning (at least in Python 3.8). It redefines Ellipsis. (As an explicit constant, '...' can be redefined.)
The syntax
a, b, ... = iterable
so to speak fills a gap in existing syntax, as the construct is at present invalid. I actually like gaps in syntax, for the same reason that I like a central reservation in a highway. The same goes for the hard shoulder / breakdown lane.
The title of this thread includes the phrase 'Stop Iterating' (capitals added). This suggests the syntax
a, b, StopIterating = iterable
where StopIterating is a new keyword that can be used only in this context.
I'd like to know what others think about this suggestion.
--
Jonathan