Message327185
| Author |
terry.reedy |
| Recipients |
ammar2, nedbat, serhiy.storchaka, terry.reedy |
| Date |
2018年10月05日.20:36:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1538771777.09.0.545547206417.issue34876@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年10月05日 20:36:17 | terry.reedy | set | recipients:
+ terry.reedy, nedbat, serhiy.storchaka, ammar2 |
| 2018年10月05日 20:36:17 | terry.reedy | set | messageid: <1538771777.09.0.545547206417.issue34876@psf.upfronthosting.co.za> |
| 2018年10月05日 20:36:17 | terry.reedy | link | issue34876 messages |
| 2018年10月05日 20:36:17 | terry.reedy | create |
|