nedbat/byterun — pull request #1 by akaptur (2013-08-05 21:54:56+00:00)
Title: Fix in-place division

I've added support for the opcodes INPLACE_FLOOR_DIVIDE and INPLACE_TRUE_DIVIDE. As far as I can tell, Python3 should never emit an INPLACE_DIVIDE (the opcode isn't defined in opcodes.py). In pyvm2.py, I've added the future division import so that the same code ("/=") will behave the same way under py2 and py3. I think this makes the tests neater.

I wrote some tests for this functionality, but they're somewhat ugly and I'm not sure if they're hitting the right level of abstraction, so please let me know how they could be better.