python3: accessing the result of 'if'

Andrey Tatarinov elephantum at
Sun Jan 9 11:51:49 CET 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()):


More information about the Python-list mailing list