On Mon, Oct 10, 2016 at 11:38 AM, Matt Wheeler <funky...@gmail.com> wrote: > On Mon, 10 Oct 2016, 00:56 Ian Kelly, <ian.g.ke...@gmail.com> wrote: > >> On Oct 9, 2016 2:57 PM, <breamore...@gmail.com> wrote: >> The Pythonic way >> >> if b >= a <= c: >> ... >> >> >> Better: >> >> if a <= b <= c: >> ... >> > > That's not equivalent. Consider `a, b, c = 1, 7, 4` > > >> Using consistent operators is not required but is easier to read and less >> confusing. >> > > Unfortunately in this case it's also less correct
Proof that it's confusing: Someone tried to tidy up the code, and unwittingly changed its semantics. ChrisA -- https://mail.python.org/mailman/listinfo/python-list