Skip to content
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

Document more macros #1869

Closed
mejrs opened this issue Sep 14, 2021 · 1 comment · Fixed by #1883
Closed

Document more macros #1869

mejrs opened this issue Sep 14, 2021 · 1 comment · Fixed by #1883

Comments

@mejrs
Copy link
Member

mejrs commented Sep 14, 2021

Currently the following macros appear in the crate root:

  • create_exception_type_object
  • impl_exception_boilerplate
  • pyobject_native_type
  • pyobject_native_type_base
  • pyobject_native_type_core
  • pyobject_native_type_extract
  • pyobject_native_type_info
  • pyobject_native_type_named
  • pyobject_native_type_sized

I'd love to add some documentation/examples for these, but:

  • I don't really know what they do
  • Which of these are actually meant for users to use? Can the *_native_* macros even be implemented by users? If not should they be private?
  • Which ones are implementation details of other macros? Should they be #[doc(hidden)]?
@davidhewitt
Copy link
Member

Good idea. TBH I would prefer that we documented none of them for users for now. All of these are implementation-detail in my opinion.

Maybe the pyobject_native_* macros will eventually be useful downstream (e.g. rust-numpy does use a couple of them), however I think that #1308 will require changes to a lot of them so would prefer we didn't encourage people to use them for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants