Greetings list,

I was wondering if adding the When keyword is a good idea.
Normally every when is theoretically an if as you can't be sure if the
event will 100% come to pass.

if x == 5:
    ...
else:
    ...

However, we use the when keyword in normal language. When you reach home,
phone me. When you pass this avenue, turn right etc. Using it in
programming might convey the intent of the programmer.

when x == 5:
    ...
else:
    ...

which still sells the idea of maybe if but hints away the expectation of
the author.

Yours,

Abdur-Rahmaan Janhangeer
pythonmembers.club <http://www.pythonmembers.club/> | github
<https://github.com/Abdur-rahmaanJ>
Mauritius
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/3VOQUSHPYTKLL65V6BUN4MMKKJOXCIKO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to