[Python-ideas] Statements vs Expressions... why?

Mathias Panzenböck grosser.meister.morti at gmx.net
Sun Sep 14 23:34:57 CEST 2008

If I understand this right, then this would become legal too:

x = if cond(a):
	return b

So what value is assigned to x when cond(a) is True, what value when it is
False? What value does return return? The thing is that return does definitively
not return anything, but as a statement, it can be placed everywhere in a block.


More information about the Python-ideas mailing list