Message326935
| Author |
serhiy.storchaka |
| Recipients |
ammar2, nedbat, serhiy.storchaka |
| Date |
2018年10月03日.05:45:55 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1538545555.45.0.545547206417.issue34876@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is because the first line of the function definition was the line of the last decorator in 3.7, and it is the line of the first decorator in 3.8.
$ rlwrap ./python -m dis
@decorator
@decorator
@decorator
def func():
pass
In 3.7:
2 0 LOAD_NAME 0 (decorator)
3 2 LOAD_NAME 0 (decorator)
4 4 LOAD_NAME 0 (decorator)
6 LOAD_CONST 0 (<code object func at 0x7f53a8281c40, file "<stdin>", line 2>)
8 LOAD_CONST 1 ('func')
10 MAKE_FUNCTION 0
12 CALL_FUNCTION 1
14 CALL_FUNCTION 1
16 CALL_FUNCTION 1
18 STORE_NAME 1 (func)
20 LOAD_CONST 2 (None)
22 RETURN_VALUE
In 3.8:
2 0 LOAD_NAME 0 (decorator)
3 2 LOAD_NAME 0 (decorator)
4 4 LOAD_NAME 0 (decorator)
2 6 LOAD_CONST 0 (<code object func at 0x7f7045a80100, file "<stdin>", line 2>)
8 LOAD_CONST 1 ('func')
10 MAKE_FUNCTION 0
12 CALL_FUNCTION 1
14 CALL_FUNCTION 1
16 CALL_FUNCTION 1
18 STORE_NAME 1 (func)
20 LOAD_CONST 2 (None)
22 RETURN_VALUE |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年10月03日 05:45:55 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, nedbat, ammar2 |
| 2018年10月03日 05:45:55 | serhiy.storchaka | set | messageid: <1538545555.45.0.545547206417.issue34876@psf.upfronthosting.co.za> |
| 2018年10月03日 05:45:55 | serhiy.storchaka | link | issue34876 messages |
| 2018年10月03日 05:45:55 | serhiy.storchaka | create |
|