Implement `IntoPyObject for Result<T, E> where E: Into<PyErr>`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
It would be nice to have this implemented so one could use PyList::new, PyTuple::new & PySet::new with fallible iterators. One quick look into the source code showed me that the callback conversion code needs adjusting to make this possible (if possible at all).
Does someone have an idea if this is feasible or wanted at all before I jump in this rabbit hole to implement this?
Thanks in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read src/impl_/callback.rs and trace the conversion paths used by PyList::new, PyTuple::new, and PySet::new. Done means determining whether fallible iterators can use Result<T, E> with E: Into and implementing the requested conversion if feasible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100