On Sun, 19 Jul 2020 at 15:43, Олег Комлев <ar12...@gmail.com> wrote:

> Thank to all disputants.
> It is possible to borrow the keyword "case" from PEP-622 (when it appears
> https://www.python.org/dev/peps/pep-0622). Keyword "case" can be written
> instead of "else/elif".  I.e.
> case COND:
>   ...
> [case COND:
>   ...]
> [case COND:
>   ...]
> All conditions COND must be different. Last  "case COND:" can be replaced
> with "else:".
>

For me this is -1 because "for... case" and "while... case" don't read like
english.

I also think the issue is less what keyword is used from "case", "if",
"except" or "joojoo" rather what the "COND" look like.
Obviously this depends on what the keyword is e.g. for "case"/"if" they
should be predicates, for "except" they should be exceptions and if adding
a new keyword it may be they are not needed.
But I would say deciding on those is the priority.

Side Note:
It does feel like "elif" should be part of the "for-else" and "while-else"
(especially while) compound statements.

-- 


Notice: 
This email is confidential and may contain copyright material of 
members of the Ocado Group. Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the members of the 
Ocado Group.

If you are not the intended recipient, please notify us 
immediately and delete all copies of this message. Please note that it is 
your responsibility to scan this message for viruses.

References to the 
"Ocado Group" are to Ocado Group plc (registered in England and Wales with 
number 7098618) and its subsidiary undertakings (as that expression is 
defined in the Companies Act 2006) from time to time. The registered office 
of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, 
Hatfield, Hertfordshire, AL10 9UL.
_______________________________________________
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/BUFMJH6JEGEMUFTRUDQUZ3UFBH54QNWP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to