Hmm... An idea: if a,b==c,d:

Erik Max Francis max at alcyone.com
Mon Nov 18 20:04:19 EST 2002


Richard Dillingham wrote:

> As I have asked everyone else that brings up that point, then why does
> the
> following fail (Using Python 2.2.2)?
> 
> if a,b==c,d: print a
>   File "<input>", line 1
>     if a,b==c,d: print a
>         ^
> SyntaxError: invalid syntax

Because you need parentheses in that circumstance.  In others, you
don't.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ All the people in his neighborhood turn around and get mad and sing
\__/ Public Enemy
    Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
 A highly categorized list of Web links.



More information about the Python-list mailing list