This would break any code that uses “when” as a variable name. https://github.com/search?l=Python&q=when&type=Code
On Sun, Dec 29, 2019 at 11:26 AM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > 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 -- 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/3VOQUSHPYTKLL65V6BUN4MMKKJOXCIKO/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ 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/63CEQQS7UQNUQDMMNXRXJSN5PSXSXBPW/ Code of Conduct: http://python.org/psf/codeofconduct/