-
Notifications
You must be signed in to change notification settings - Fork 784
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
introduce PyIterator::from_bound_object #3702
Conversation
20a71ba
to
de276b6
Compare
de276b6
to
d034f61
Compare
src/types/iterator.rs
Outdated
pub(crate) fn from_object2<'py>(obj: &Bound<'py, PyAny>) -> PyResult<Bound<'py, PyIterator>> { | ||
/// Constructs a `PyIterator` from a Python iterable object. | ||
/// | ||
/// Equivalent to Python's built-in `iter` function. |
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.
I think an intra doc link to PyAnyMethods::iter
would be nice as this is usually the more convenient form compared to calling this directly.
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.
Agreed 👍
d034f61
to
783e98b
Compare
CodSpeed Performance ReportMerging #3702 will improve performances by 11.66%Comparing Summary
Benchmarks breakdown
|
Follows the standard pattern we're now going for to introduce a new bound constructor while deprecating the old one.
This isn't mergeable until after #3694