Message363586
| Author |
vstinner |
| Recipients |
Mark.Shannon, alex, ammar2, ezio.melotti, pjenvey, rhettinger, terry.reedy, vstinner |
| Date |
2020年03月07日.09:22:27 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1583572947.6.0.0709221420175.issue14126@roundup.psfhosted.org> |
| In-reply-to |
| Content |
> I believe this was implemented in issue33234
I don't think so. The bytecode in Python 3.9 still uses "BUILD_LIST 0":
Python 3.9.0a4+ (heads/daemon_thread_runtime2-dirty:48652767d5, Mar 7 2020, 00:56:07)
>>> def f():
... for i in range(10000):
... [j for j in range(10000)]
...
>>> import dis; dis.dis(f)
(...)
Disassembly of <code object <listcomp> at 0x7ffab2c9fd40, file "<stdin>", line 3>:
3 0 BUILD_LIST 0
2 LOAD_FAST 0 (.0)
>> 4 FOR_ITER 8 (to 14)
6 STORE_FAST 1 (j)
8 LOAD_FAST 1 (j)
10 LIST_APPEND 2
12 JUMP_ABSOLUTE 4
>> 14 RETURN_VALUE |
|