python3: accessing the result of 'if'

Andrey Tatarinov elephantum at dezcom.mephi.ru
Sun Jan 9 05:51:49 EST 2005


Carl Banks wrote:
> As a compromise, howabout:
> 
> . if m > 20 where m=something():
> .     do_something_with(m)

That's good, but first idea was about 'where' block that contains any 
expressions, that we need, for example function definition. the syntax 
you proposed has same problems as 'lambda'.

> The main problem here (as some would see it) is that you can't do
> something this:
> 
> . if m > 20 where (def m(): a(); b()):

exactly



More information about the Python-list mailing list