On Wed, Jul 13, 2016 at 12:48 PM, Vijay Kumar <[email protected]> wrote:
> Hi Everyone,
> I wrote an article on Python byte code hacking. The article is available
> from http://www.bravegnu.org/blog/python-byte-code-hacks.html The article
> uses an incremental approach for explaining Python's code objects and how to
> modify them. Unfortunately, I am stuck with Python 2, because Python 2 does
> not optimize out the divide operation, at compile time, and my example
> sequence depends on that behavior.
def f():
return g(6, 2)
def g(a, b):
return a // b
Now it can't optimize out the operation.
--
https://mail.python.org/mailman/listinfo/python-list