Neal Norwitz added the comment: I forgot to mention that if another loop was added to PyCode_Optimize that kept track of the # of times each local variable was LOAD_FAST/STORE_FAST/DELETE_FAST and that the count was 2, we could perform a similar optimization without requiring the return.
Bonus points for other cases like if it was the last use inside a list comprehension or the variable is otherwise unaccessible. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2181> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com