[Python-ideas] an unless statement would occasionally be useful
Ryan Gonzalez
rymg19 at gmail.com
Sun May 17 22:57:11 CEST 2015
Has anyone done that?????
I mean, I like Python without `unless`, but I've never seen it used to mean that. Usually, `until` is used.
On May 17, 2015 3:31:29 PM CDT, Douglas La Rocca <larocca at abiresearch.com> wrote:
>it could also be confused as a synonym for
>
> while not condition:
> ...
>
>
>
>
>> On May 17, 2015, at 4:28 PM, Mark Lawrence <breamoreboy at yahoo.co.uk>
>wrote:
>>
>>> On 17/05/2015 19:07, Charles Hixson 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.
>>
>> IMHO if a statement is only "occasionally useful" is should not be in
>the Python language.
>>
>> --
>> My fellow Pythonistas, ask not what our language can do for you, ask
>> what you can do for our language.
>>
>> Mark Lawrence
>>
>> _______________________________________________
>> 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/
>_______________________________________________
>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/
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150517/08513ae1/attachment-0001.html>
More information about the Python-ideas
mailing list