Replies: 2 comments 2 replies
-
Nice to hear you like PyO3! The big question here is what you want to do with your class. If you want to access it from the Rust side, the Rust code can't know anything about the API coming from Python, so you're limited to use the generic Python access API ( If you want to use it from Python, then you might be able to do a trick: create the Rust class as a mixin, and make a new class (you can do that in Python or in Rust) which inherits from the Rust mixin and the Python base class (in that order). However, if you overwrite methods and want to call its base methods, it will get complicated. I don't think we have an API that mirrors |
Beta Was this translation helpful? Give feedback.
-
Are you looking for #991? It should be possible eventually, however we're unfortunately not there yet (and it hasn't been the highest-priority item for me). |
Beta Was this translation helpful? Give feedback.
-
Hi!
This crate is great and the more I use it, the more I discover!
I saw that we have subclass and extends for pyclass in the same Rust file/module, but is there any way to extend a class declared and implemented in a Python module from Rust?
Beta Was this translation helpful? Give feedback.
All reactions