-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API break: renamed some
class_<..>
members, added documentation
While documenting the nanobind ``class_<>::def*`` methods, I realized how poorly named they all are. For example, there were function ``.def_readonly_static()`` and ``.def_readwrite_static()`` for read-only and mutable fields, but their property variants were called ``.def_property_readonly_static()`` and ``.def_property_static()``. This commit changes the interface to be more consistent and less verbose. It now looks as follows: - Methods & constructors: ``.def()`` - Fields: ``.def_ro()`` and ``.def_rw()`` - Properties: ``.def_prop_ro()`` and ``.def_prop_rw()`` - Static methods: ``.def_static()`` - Static fields: ``.def_ro_static()`` and ``.def_rw_static()`` - Static properties: ``.def_prop_ro_static()`` and ``.def_prop_rw_static()`` Apologies about the API break. nanobind is still in its experimental phase (version number 0.x.y), which means that occasional API changes can occur if they are considered a long-term improvement.
- Loading branch information
Showing
22 changed files
with
933 additions
and
618 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.