-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow nanobind methods on non-nanobind classes.
This allows us to extend an existing Python (or pybind11!) class with methods defined in nanobind. This is handy if you want to add a small amount of nanobind code to a class defined in other ways. For example, one use is to migrate methods of a pybind11-defined class to nanobind one by one. All we have to do to allow this is remove the type check. I can't see anything that goes wrong if we simply allow dispatch to proceed.
- Loading branch information
Showing
3 changed files
with
46 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters