On 12/05/18 01:41, Juancarlo Añez wrote:
while (cmd := get_command()).token != CMD_QUIT:
cmd.do_something()
while get_command() as cmd:
if cmd.token == CMD_QUIT:
break
cmd.do_something()
This would be exactly one of the patterns Python currently forces on me
that I don't like. This "while expr as name" form is not a win in my book.
--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/