On Sun, May 12, 2019, 5:36 PM Paul Moore <p.f.mo...@gmail.com> wrote:

> On Sun, 12 May 2019 at 21:06, David Mertz <me...@gnosis.cx> wrote:
> > I thought of 'as' initially, and it reads well as English. But it felt
> to me like the meaning was too different from the other meanings of 'as' in
> Python. I might be persuaded otherwise.
>
> If you think in terms of "named loops" rather than "labels", "as"
> makes a lot more sense.


Every name created with 'as' currently is a regular Python object, with a
memory address, and some methods, that can participate in comparison (at
least equality), that has a type, can be passed as a function argument,
etc. Actually, all that is true of EVERY name in Python other than keywords.

It seems like none of this would be true of a loop name/label. Hence my
first thought that a different way of introducing the word is more clear...
Maybe we can just prefix lines with labels instead, and add a 'goto'
command :-)
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to