On Sun, Mar 30, 2014 at 5:52 PM, Ben Finney <ben+pyt...@benfinney.id.au> wrote: > Chris Angelico <ros...@gmail.com> writes: > >> The problem isn't that I can't see what the comparisons are. It makes >> very good sense to bound a variable within constants; but you already >> know exactly where 2 is on the number line, so asking "Is 2 between >> these two variables" seems a bit odd. Maybe it's less so with the >> strong mathematical background, but it seems odd to me. > > I don't feel odd about asking the question “Is 2 between these two > values?”. It's straightforward and concise. Can you explain better why > you find it odd?
Possibly because the "variable between two constants" is something I've done often (usually in the more explicit form of "x > min && x < max" in a language without chained comparisons), usually bounds-checking some value. I've never had to ask whether a single constant has two variables, one on either side. But that's just that I've personally never done it; it doesn't mean nobody does it, by any means. ChrisA -- https://mail.python.org/mailman/listinfo/python-list