-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
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
#[pyclass(dict)] makes objects without __dict__ #123
Comments
I'd like to work on this, but I would need some hints on what needs to be done. |
As far as I know, Code snippets that should already add Lines 323 to 327 in 6c58766
pyo3/pyo3-derive-backend/src/pyclass.rs Lines 278 to 299 in 6c58766
|
I tried to mitigate problem of storing &PyObject in pyo3 class struct by going back to Python, using
__dict__
instance storage. Documentation mentions single-token attribute to py::class macros. I have studied code that uses this attribute and found it is sophisticated machinery, using special Python C-API construct in PyType header. Respect for special handling of__dict__
, AFAIK you could get away with heap allocated PyDict and provide access via getter.I guess it's some minor scholar mistake again, please point in right direction.
The text was updated successfully, but these errors were encountered: