On 1/2/20 3:07 PM, Random832 wrote:
> On Thu, Jan 2, 2020, at 13:22, Dan Sommers wrote:

>> What about "if except" (any time I can eliminate a "not," that's a
>> good thing):
>
> ... is this meant to be for the doesn't-throw case or does-throw? ...
>>
>>      if except x:
>>          y

That would be the does-throw case.  Read it as "if there's an exception
evaluating x, then do the following."

> ... how are we eliminating the not?

I changed "not try" to "except," thus eliminating the "not."

>> which could even leave room to specify which exception(s) is/are caught:
>>
>>      if except ValueError: x:
>>          y
>>
>> except that the two colons on one line look a little odd in Python.
>
> if x except ValueError?
_______________________________________________
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/WIY5NM5PG2TULDAYBGI6BGT4PMGW7TGC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to