Allow calling Py::as_ref() and Py::into_ref() against PySequence, PyIterator and PyMapping. #1682
Conversation
3f821ad to
b9f28dc
Compare
|
Sorry for being AWOL the past week, I've been swamped and not able to keep up with OSS. This is top of my list to review either tonight or tomorrow evening. |
davidhewitt
left a comment
There was a problem hiding this comment.
Thanks, overall I'm in favour of having these two APIs for Py<PySequence>. I think it's perfectly fine to add these in manually. Maybe in the future we'll have a trait which automatically produces this API again.
If it's not too much to ask, would you be willing to add the same for Py<PyIterator>, which is in almost exactly the same position?
That's also what I've been wondering. Sounds nice. |
a050004 to
f115c70
Compare
|
I think I've done with them. Can you take a look? |
davidhewitt
left a comment
There was a problem hiding this comment.
Thanks, it's looking almost there!
There's a new implementation for IntoPyPointer for PyAny which isn't sound and needs to be removed.
Also I made a few comments to tidy up the tests a little bit.
Finally, looks like you may need to run cargo fmt before you repush.
|
I'm going to finish this up and also add support for |
2cfdcd9 to
00a4f43
Compare
00a4f43 to
ae05020
Compare
This patch allows one to call
Py::as_ref()againstPySequenceby supplyingPyTypeInfofor it.