Basic optimization of python.
Terry Reedy
tjreedy at udel.edu
Wed Apr 9 17:35:48 EDT 2008
"??" <littlesweetmelon at gmail.com> wrote in message
news:cdb837ea0804062230y7efc2105x7523c05133a0bed7 at mail.gmail.com...
| I wonder whether python compiler does basic optimizations to .py.
In general, the answer to such questions depends on the implementation and
version thereof. For CPython, you can look at bytecode with the dis module
as another poster showed.
| Again, how about contant calculation?
| Eg:
| a = 1 + 2
| .vs.
| a = 3
This was added to CPython in version 2.5, I believe.
More information about the Python-list
mailing list