<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: Boolean confusion</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>#- "Frantisek Fuka" <fuka@fuxoft.cz> wrote in message</FONT>
<BR><FONT SIZE=2>#- <A HREF="news:bnua52$tnv$1@ns.felk.cvut.cz" TARGET="_blank">news:bnua52$tnv$1@ns.felk.cvut.cz</A>...</FONT>
<BR><FONT SIZE=2>#- > Can anyone please explain why these two give different </FONT>
<BR><FONT SIZE=2>#- results in Python</FONT>
<BR><FONT SIZE=2>#- > 2.3?</FONT>
<BR><FONT SIZE=2>#- ></FONT>
<BR><FONT SIZE=2>#- >  >>> 'a' in 'abc' == 1</FONT>
<BR><FONT SIZE=2>#- > False</FONT>
<BR><FONT SIZE=2>#- >  >>> ('a' in 'abc') == 1</FONT>
<BR><FONT SIZE=2>#- > True</FONT>
</P>

<P><FONT SIZE=2>John Roth wrote:</FONT>
<BR><FONT SIZE=2>#- In other words, your first expression is equivalent</FONT>
<BR><FONT SIZE=2>#- to:</FONT>
<BR><FONT SIZE=2>#- </FONT>
<BR><FONT SIZE=2>#- "a" in ("abc" == 1)</FONT>
</P>

<P><FONT SIZE=2>But:</FONT>
</P>

<P><FONT SIZE=2>Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32</FONT>
<BR><FONT SIZE=2>Type "copyright", "credits" or "license()" for more information.</FONT>
</P>

<P><FONT SIZE=2>>>> "a" in ("abc" == 1)</FONT>
</P>

<P><FONT SIZE=2>Traceback (most recent call last):</FONT>
<BR><FONT SIZE=2>  File "<pyshell#0>", line 1, in -toplevel-</FONT>
<BR><FONT SIZE=2>    "a" in ("abc" == 1)</FONT>
<BR><FONT SIZE=2>TypeError: iterable argument required</FONT>
</P>
<BR>

<P><FONT SIZE=2>¿?</FONT>
</P>

<P><FONT SIZE=2>.       Facundo</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><B><FONT SIZE=2>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .</FONT></B></P>

<P><B><U><FONT SIZE=2>ADVERTENCIA </FONT></U> </B>
</P>

<P><B><FONT SIZE=2>La información contenida en este mensaje y cualquier archivo anexo al mismo, son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por la ley. </FONT></B></P>

<P><B><FONT SIZE=2>Si Ud. No es uno de los destinatarios consignados o la persona responsable de hacer llegar este mensaje a los destinatarios consignados, no está autorizado a divulgar, copiar, distribuir o retener información (o parte de ella) contenida en este mensaje. Por favor notifíquenos respondiendo al remitente, borre el mensaje original y borre las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo. </FONT></B></P>

<P><B><FONT SIZE=2>Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones Personales S.A. o alguna empresa asociada. </FONT></B></P>

<P><B><FONT SIZE=2>Los mensajes electrónicos pueden ser alterados, motivo por el cual Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación cualquiera sea el resultante de este mensaje. </FONT></B></P>

<P><B><FONT SIZE=2>Muchas Gracias.</FONT></B>
</P>

</BODY>
</HTML>