[Python-ideas] a in x or in y
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Feb 14 00:04:58 CET 2014
Boris Borcic wrote:
> Are you trying to say "X in Y and" forms a complete expression?
No, I think he's saying that "X in Y" forms a complete
expression, but only if it's *not* followed by "or in".
If it is, you need to back up and re-interpret it as
"X in <something more complicated>".
A syntax along the lines of
X in either Y or Z
would avoid the problem. But we don't have a good
candidate for 'either' that's already a keyword.
--
Greg
More information about the Python-ideas
mailing list