APrioriInvestments / typed_python

An llvm-based framework for generating and calling into high-performance native code from Python.
Apache License 2.0
198 stars 8 forks source link

Clean up 'PyInstance' methods #424

Open braxtonmckee opened 1 year ago

braxtonmckee commented 1 year ago

PyInstance has a few core methods for determining if a PyObject is a TP instance and converting between Instance, (void, Type), and PyObject that could be more explicitly named and cleaned up.

In particular, we should have one API for taking a PyObject to an InstanceRef, and producing a PyObject from an InstanceRef.