Uh oh!
There was an error while loading. Please reload this page.
pytypes: Add iterable_t<T> - #2950
Conversation
628ac3e to
8837d7dCompare8837d7d to
9ec5905Compare9ec5905 to
8273530CompareUh oh!
There was an error while loading. Please reload this page.
rwgk
left a comment
There was a problem hiding this comment.
Cool! Just questions regarding compatibility with the smart_holder branch.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
alexdewar
commented
Apr 6, 2022
Just commenting to say I'm working on something atm for which this would be useful :-) |
rwgk
commented
Apr 6, 2022
This needs to be resurrected after the sweeping changes for clang-format and Python 2 drop. You could transfer the diffs to a new PR and work on it there. |
EricCousineau-TRI
commented
Apr 11, 2022
It was luckily small enough w/ just a merge + conflict resolution. I think the review is still fine w/ merge. Let me know if you'd still like a new PR. |
EricCousineau-TRI
commented
Apr 11, 2022
|
rwgk
left a comment
There was a problem hiding this comment.
High-level:
At the moment list_caster in stl.h explicitly checks whether the input argument is a sequence, but I would like to argue that that's slightly too restrictive and iterable should be accepted.
The code seems to be dicy ("bad! For now,") and the gain seems really minute ("slightly too restrictive").
The current implementation doesn't seem exception safe (leaks b/o missed Py_DECREF if exceptions are thrown before the control flow reaches those).
But really I feel it's best not to get into this scraping-the-bottom-of-the-barrel territory at all.
EricCousineau-TRI
commented
Apr 11, 2022
Aye - so you think it's best to not introduce the feature? Fine by me, just want to clarify some points.
Too restrictive in what sense? Not an iterator, or shouldn't check types, or something else? |
rwgk
commented
Apr 11, 2022
Sorry I wasn't clear, the "slightly too restrictive" quote is from here: #1773 I.e. my interpretation was that even the original requester was thinking the current behavior is only "slightly too restrictive". (I agree.) My cost/benefit assessment is just one vote! Yes, I'd say let's not add this, but if there are other opinions I'll reconsider. I'm just offering my current opinion. |
EricCousineau-TRI
commented
Apr 11, 2022
Sounds good! I'm not too wed to this, but will await opinions, and close if we don't hear back for a bit (~month?) @alexdewar If you're available, is this still useful as-is? |
Description
Resolves#1773 as an alternative / less disruptive approach
Drawing from RobotLocomotion/drake#14898
Suggested changelog entry: