Terry J. Reedy <tjre...@udel.edu> added the comment:
I have never looked at the trace of a decorated object before. The 3.7 behavior treating the inner decorator line as the first line of the decorated function definition looks wrong to me. I actually expected the line pointer to move down to the def line, analogously to the following, at least until after MAKE_FUNCTION, but moving to the beginning of the statement for the rest would seem proper. >>> dis.dis("""a = f( f( f( 3)))""") 1 0 LOAD_NAME 0 (f) 2 2 LOAD_NAME 0 (f) 3 4 LOAD_NAME 0 (f) 4 6 LOAD_CONST 0 (3) 8 CALL_FUNCTION 1 10 CALL_FUNCTION 1 12 CALL_FUNCTION 1 14 STORE_NAME 1 (a) 16 LOAD_CONST 1 (None) 18 RETURN_VALUE ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34876> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com