Re: [Python-Dev] non-binary operators

Feb. 17, 2003
3:10 p.m.
Gary Herron wrote:
Good point. I've never actually used (a<b<c), but I'm pleasently surprised when reminded of it's existence. There is however a difference. A whole string of '<' operators (or even of string of mixed '<' and '>' operators) can be understood by considering each operation in isolation as a binary operation.
Trying hard to avoid PEP 308 discussions: :-) Yes and no. You cannot collapse the expression, so these binary "operations" are really only partial operations. Granted, with th*n/el*e the left-most operand participates in both partial operations, but I'll leave that discussion to c.l.py. I was just pointing out that there's precedent for (a OP b OP c) != ((a OP b) OP c) != (a OP (b OP c)). -Jerry
8132
Age (days ago)
8132
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gerald S. Williams