-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stubgen: added a
__nb_signature__
property for nanobind functions
The ``__nb_signature__`` property of nanobind functions exposes: - how many overloads a function has - the function signature for each overload - the docstring for each overload (or ``None``) - the default arguments of each overload (if present), which are directly returned as Python objects. This leaves the complex and potentially ill-defined task of turning those Python objects into a valid Python expression to the consumer of this API. - The returned signature references the default arguments using substrings of the form '\0', '\1', etc.
- Loading branch information
Showing
4 changed files
with
94 additions
and
25 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
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