Georg Brandl <ge...@python.org> added the comment: Chaining comparison operators inserts implicit "and" conditions:
a OP b OP c OP d is equivalent to (a OP b) and (b OP c) and (c OP d) This is most useful with ==, <, <= and so forth, but "in" and "is" also count as comparison ops and have the same precedence. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14247> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com