>>>>> "TP" == Tim Peters <tim.one@home.com> writes: TP> It's "correct". I've been using Python longer than Guido TP> <wink>, and I'm amazed this is the first time I got bit by TP> this! Here's a hint: Oh, that is twisted! :) Let's throw in some parentheses just to confuse people even more: >>> 'a' in 'a' == 'a' 1 >>> ('a' in 'a') == 'a' 0 >>> 'a' in ('a' == 'a') Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: 'in' or 'not in' needs sequence right argument >>> 'a' in 'a' == 1 0 >>> ('a' in 'a') == 1 1 >>> 'a' in ('a' == 1) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: 'in' or 'not in' needs sequence right argument >>>>> "PP" == Paul Prescod <paulp@ActiveState.com> writes: PP> It looks like dubious hypergeneralization to me! <0.7 wink> PP> Seriously, does this "feature" ever make sense to apply to the PP> in operator? I don't know; I wonder if "normal" people think of `in' as a chainable comparison operator or not. You're not suggesting to change this are you? gotta-leave-something-`in'-there-for-job-security-ly y'rs, -Barry
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4