31.12.19 08:20, iman.h.a.kha...@gmail.com
пише:
Hi
I think the following syntax's:
if foo in foobar or bar in foobar or baz in foobar:
pass
if foo in foobar and bar in foobar and baz in foobar:
pass
can be more readable and shorter if written as:
if foo or bar or baz in foobar:
pass
if foo and bar and baz in foobar:
pass
maybe for "is" instead of:
if foobar is foo or foobar is bar or foobar is baz:
pass
if foobar is foo or bar or baz:
pass
This looks like an interesting idea for a completely new programming
language (together with "when" proposed as an alias of "if" in the
neighbor thread). Unfortunately it is not compatible with existing
Python syntax.
And be aware that despite such syntax looks more readable to you, it may
look confusing and ambiguous to other programmers.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/OUL7376ADFUMU2WTPFXSLZGOTLL3WGXC/
Code of Conduct: http://python.org/psf/codeofconduct/