Check if a given value is out of certain range

Emile van Sebille emile at fenx.com
Thu Oct 1 16:15:21 EDT 2015


On 10/1/2015 12:59 PM, Marko Rauhamaa wrote:
> John Gordon <gordon at panix.com>:
>>> I wasn't commenting directly to the "ask not..." quote; I was
>> referring upthread to the choice between
>>>> not 0 <= x <= 10
>>>> and
>>>> x < 0 or x > 10
>>>> Both are of course understandable, but in my opinion, the latter one
>> takes slightly less effort to grok.
>> Wouldn't
>> x < 0 or 10 < x
>> be even more visual?

Well, I had to parse that one twice to grok it.
Emile


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /