This is a thing that Python badly needs; especially for callback-heavy frameworks like Twisted. Unfortunately, the proposed syntax seems deeply un-Pythonic to me (to be fair, it's based on decorators whose syntax is also deeply un-Pythonic).<p>The most natural syntax I've ever seen proposed for this features is a trailing "where:" like this:<p><pre><code> x = ((p + q) / r, (p - q) / r) where:
p = -b
q = sqrt(b*b - 4*a*c)
r = 2*a
</code></pre>
Unfortunately, that choice was nixed because of a fear that people would expect "where" to behave like SQL's "where". The second best English word would be "having", which fails the same test, and I can't really think of any more. :(