[Python-3000] Betas today - I hope
solipsis at pitrou.net
Fri Jun 13 09:52:43 CEST 2008
Georg Brandl <g.brandl <at> gmx.net> writes:
> I would argue that the __enter__ and __exit__ behavior should be changed too.
> The reason for the current behavior is this:
> IOW, when "with" is compiled, the attributes are retrieved using bytecode.
> It wouldn't be hard to have a WITH_SETUP opcode (along with the already
> existing WITH_CLEANUP) that would make the bytecode read like:
It's not really a change in behaviour, just an optimization, isn't it?
More information about the Python-3000