[pypy-dev] Applevel types

Dan Roberts ademan555 at gmail.com
Thu Jan 7 08:59:03 CET 2010

    I want to make multiple interpreter-level types appear as a single
application-level type.  Armin got me started in the right direction,
pointing out pypy/objspace/std/{small,}int{type,object}.py to me.  This
made it clear that sharing a typedef will accomplish this, however in
the case of integer objects, only __new__ is registered with the
typedef.  How are other methods registered for object instances?  I
assumed that only methods provided to TypeDef would be visible at the
application-level on instances, however this must not be the case, are
any methods on the interpreter-level classes automatically wrapped?  Can
anyone provide more complex examples or explain exactly how the int
functionality works?


More information about the Pypy-dev mailing list