On Thu, 05 Feb 2009 18:04:35 -0000, <[email protected]> wrote:
p = a / b
where
a = 20 / len(c)
b = foo(d)
You'd want to do it with paired keywords, in the manner of try/except,
to avoid utterly breaking Python's syntax conventions. Perhaps
something like this:
do:
p = a / b
where:
a = 20 / len(c)
b = foo(d)
or even:
where:
a = 20 / len(c)
b = foo(d)
do:
p = a / b
Effectively you're creating a little local namespace for temporary
variables. I'm not sure it buys you a lot, even as sugar, and I'm
really not convinced by the bypartite form, but it's definitely
possible.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list