Return value of an assignment statement?

mrstephengross mrstevegross at gmail.com
Thu Feb 21 16:57:11 EST 2008


> What you can't do (that I really miss) is have a tree of assign-and-test
> expressions:
>         import re
>         pat = re.compile('some pattern')
>         if m = pat.match(some_string):
>             do_something(m)

Yep, this is exactly what I am (was) trying to do. Oh well.... Any
clever ideas on this front?

--Steve



More information about the Python-list mailing list