[Python-ideas] except expression

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 17 23:50:44 CET 2014


Chris Angelico wrote:
> The inner scope does seem to demand a function call, though.

A function call isn't *required* to achieve the effect
of an inner scope, as far as I know. It's just that
implementing an inner scope for list comprehensions
without it would have required extensive changes to
the way the bytecode compiler currently works, and
using a function was easier.

-- 
Greg


More information about the Python-ideas mailing list