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

Move wrap_pyfunction into prelude? #1691

Closed
Eric-Arellano opened this issue Jun 23, 2021 · 1 comment · Fixed by #1695
Closed

Move wrap_pyfunction into prelude? #1691

Eric-Arellano opened this issue Jun 23, 2021 · 1 comment · Fixed by #1695

Comments

@Eric-Arellano
Copy link
Contributor

Eric-Arellano commented Jun 23, 2021

Hello! We're using wrap_pyfunction a lot in pantsbuild/pants, and found we prefer #[pyfunction] over #[pyfn] to keep our #[pymodule] block clean. (I'm submitting a docs PR on other things we've found to help.)

I'm wondering if it makes sense to move the macro into the prelude, given how common this type seems to be, for fewer imports? Maybe the create_exception macro too?

I'm happy to implement if you think so!

@davidhewitt
Copy link
Member

I would definitely support wrap_pyfunction being in the prelude. It's very commonly used.

I would prefer not to add create_exception for now, only because we plan to eventually replace it (#295).

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

Successfully merging a pull request may close this issue.

2 participants