[Python-ideas] an unless statement would occasionally be useful
David Mertz
mertz at gnosis.cx
Sun May 17 21:02:00 CEST 2015
This exists and is spelled 'not' in Python :-)
On May 17, 2015 11:16 AM, "Charles Hixson" <charleshixsn at earthlink.net>
wrote:
> I'm envisioning "unless" as a synonym for "if not(...):" currently I use
>
> if .... :
> pass
> else:
> ...
>
> which works.
>
> N.B.: This isn't extremely important as there are already two ways to
> accomplish the same purpose, but it would be useful, seems easy to
> implement, and is already used by many other languages. The advantage is
> that when the condition is long it simplifies understanding.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150517/0c9f073a/attachment.html>
More information about the Python-ideas
mailing list