Implement relevant section of the Object Protocol

Issue #13 resolved
repo owner created an issue

Currently, py.js implements a rough equivalent to PyObject_Call.

It also needs, at the very least,

And probably the rest of the reading stuff (repr, str, unicode, isinstance, istrue, not, hash & size (PyObject_Size seems to be used very slightly more than PyObject_Length in the cpython source, though not by much)

(note: the APIs of the *String versions are usually better suited, so use that with the base name)

Note that this means PyObject_SetAttr, PyObject_DelAttr, PyObject_SetItem and PyObject_DelItem — and the corresponding magic methods — could be implemented and used contrary to what the doc' currently states.

Also needs numerical operations (at least add/sub/mul/div)

Comments (5)

  1. Log in to comment