-
Notifications
You must be signed in to change notification settings - Fork 678
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: pile of tweaks and additions #2580
Conversation
1274266
to
1fc85f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great!
guide/src/function.md
Outdated
- Concrete functions, e.g. `fn foo()`: add `#[pyfunction]` and then use [`wrap_pyfunction!`] to get the corresponding [`PyCFunction`]. | ||
- Dynamic functions, e.g. `foo: fn()` either: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "named" and "anonymous/closures" versus "concrete" and "dynamic"? I don't think many people are familiar with those terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better
guide/src/function/error_handling.md
Outdated
|
||
The Rust compiler will not permit implementation of traits for types outside of the crate where the type is defined. (This is known as the "orphan rule".) | ||
|
||
Given a type `OtherError` which is defined in thirdparty code, there are two main strategies available to integrate it with PyO3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be third-party
or third party
? (same for the other usages). I'm not a native english speaker so I'm not sure 馃樅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I think third-party
is the adjective form and third party
the noun from looking at https://dictionary.cambridge.org/dictionary/english/third-party, so I will use third-party
here.
1d93ded
to
f753790
Compare
I was stuck on the train this afternoon with barely a working internet connection, so what better thing to do than close a whole pile of docs issues 馃槃
I tried to land everything (mostly) as separate commits. Changes included:
::pyo3
from guide samples (given that's not quite what the macro expands to anyway!)Python::with_gil
聽#2495__richcmp__
makes object unhashable聽#2122All reviews welcome, I'll probably merge this on Tuesday if I haven't heard anything so that it can be part of the published 0.17 guide. Figure even if it's not perfect it's probably better than not including in the release :)