[Python-ideas] 'where' statement in Python?
bruce at leapyear.org
Wed Jul 21 17:51:26 CEST 2010
I'm unconvinced of the value at this point but notwithstanding that let me
toss in an alternative syntax:
This executes the two suites in order with any variable bindings created by
the first suite being local to the scope of the two suites. I think this is
more readable than the trailing clause and is more flexible (you can put
multiple statements in the second suite) and avoids the issue with anyone
wanting the where clause added to arbitrary expressions.
FWIW, in math it's more common to list givens at the top.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas