halgari/clojure-py — Issue #22: Write functions for bytecodes
Author: halgari
Created: 2012-02-02 21:19:16+00:00
State: open

When it makes sense, we need functions in ```py/*``` for the majority of the bytecodes found in the documentation for [dis](http://docs.python.org/library/dis.html) .

After some tests, it looks like this won't work all the time: ```(.__add__ foo bar)``` instead, we need to use the VM's bytecode ```BINARY_ADD```. This is because the VM determines on the fly if it should call ```foo.__add__(bar)``` or ```bar.__radd__(foo)``` depending on which object supports what operations. Using the bytecodes instead of methods directly will fix this. Perhaps we should put all these in ```py.bytecodes/*``` ?