Nick Coghlan <ncoghlan <at> gmail.com> writes: > That said, the with statement implementation is already a bit different > in 2.6/3.0 (it moves things around on the stack so it can avoid the > STORE_FAST/LOAD_FAST/DELETE_FAST operations):
Hmm, check again with the current 3.0 - it has changed back to storing __exit__ in a temporary variable. That's because "finally" blocks have gotten more complex semantics, and it is too quirky to try to find out the stack level where we stored __exit__. cheers Antoine. _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com