I don't understand PEP 308.

Erik Max Francis max at alcyone.com
Wed Mar 12 20:50:21 EST 2003


Tetsuo wrote:

> Originally posted by Jp Calderone
>
> >   It proposes an if-then expression.
> 
> What's the difference? More importantly, what is the benefit?

Python makes a distinction between expressions and statements.  That's
why things like

	if x = 1:
	   ...

are illegal, since assignment is a statement and not an expression.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Life is an effort that deserves a better cause.
\__/ Karl Kraus
    The laws list / http://www.alcyone.com/max/physics/laws/
 Laws, rules, principles, effects, paradoxes, etc. in physics.




More information about the Python-list mailing list