We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducer:
import cppyy cppyy.cppdef(""" class MyBaseClass{ public: virtual ~MyBaseClass() = default; protected: int _data = 0; }; """) class MyDerivedClass(cppyy.gbl.MyBaseClass): pass
The error:
Traceback (most recent call last): File "reproducer.py", line 14, in <module> class MyDerivedClass(cppyy.gbl.MyBaseClass): pass KeyError: '_data'
The text was updated successfully, but these errors were encountered:
Can be fixed like this: root-project/root#16851
Sorry, something went wrong.
The example above doesn't fail for me.
It's also not clear to which part you are referring in the above, but if this:
#if PY_VERSION_HEX < 0x30d00f0 PyObject* pyf = PyMapping_GetItemString(disp_dct, (char*)name.c_str()); #else PyObject* pyf = nullptr; PyMapping_GetOptionalItemString(disp_dct, (char*)name.c_str(), &pyf); #endif
then all that does is suppress the exception, not solve the issue. It's also not Py3.13 specific.
That is, in your case, does this work (it does for me):
class MyDerivedClass(cppyy.gbl.MyBaseClass): def gime(self): return self._data m = MyDerivedClass() print(m.gime())
B/c if only the error is suppressed with the "fix", then the above will still fail.
No branches or pull requests
Reproducer:
The error:
The text was updated successfully, but these errors were encountered: