wlav / cppyy

Other
384 stars 38 forks source link

Special variables are missing with pypy #209

Open saraedum opened 5 months ago

saraedum commented 5 months ago

The following snippet behaves differently with CPython and PyPy.

>>> import cppyy
>>> cppyy.cppdef('void f(){}')
True
>>> cppyy.gbl.f.__sig2exc__
False  # CPython
AttributeError: 'CPPStaticOverload' object has no attribute '__sig2exc__'  # PyPy

I didn't find this mentioned in the documentation here. Is this the expected behavior, currently?


This happened on Linux with cppyy 3.1.2 from conda-forge with PyPy 7.3 and Python 3.10, respectively.