Basic optimization of python.

Diez B. Roggisch deets at nospam.web.de
Wed Apr 9 08:09:39 EDT 2008


> This is safe, and is done:
> 
>>>> import dis
>>>> def f(): x = 1 + 2
> ...
>>>> dis.dis(f)
>   1           0 LOAD_CONST               3 (3)
>               3 STORE_FAST               0 (x)
>               6 LOAD_CONST               0 (None)
>               9 RETURN_VALUE
>>>>

So I stand corrected. Any idea when that was introduced?

Diez



More information about the Python-list mailing list