Check if a given value is out of certain range
John Gordon
gordon at panix.com
Thu Oct 1 15:41:27 EDT 2015
In <560d8726$0$1602$c3e8da3$5496439d at news.astraweb.com> Steven D'Aprano <steve at pearwood.info> writes:
> > But it takes ever-so-slightly more effort to do so.
> Slightly more effort than what alternative? How would you communicate the
> idea of *not* asking for X without using the concept of "not"?
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.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list