[Python-ideas] a in x or in y

Chris Angelico rosuav at gmail.com
Fri Feb 14 00:43:35 CET 2014


On Fri, Feb 14, 2014 at 10:26 AM, Amber Yust <amber.yust at gmail.com> wrote:
> The issue I see with "X in any(Y, Z)" is that it's unclear to the reader how
> it differs from "X in (Y,Z)".

X in (Y, Z)
<->
X == any(Y, Z)

This equivalence is seen in SQL, more or less. I wouldn't want to
encourage it, though.

ChrisA


More information about the Python-ideas mailing list