[Python-ideas] For-loop variable scope: simultaneous possession and ingestion of cake

Bruce Leban bruce at leapyear.org
Sat Oct 4 23:53:45 CEST 2008


Let me widen the scope of the discussion. I think it's a bit strange that
the with statement doesn't have a scope. That is:
           with f() as x:
               body
           # x is still defined here

Is this useful? To my thought it would make more sense if it introduced a
scope.

--- Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20081004/c0477131/attachment.html>


More information about the Python-ideas mailing list