geometry: clean up imOut if operation fails#9785
Conversation
|
I understand completely that you dislike that the return value is ignored. However, the return value only indicates failure if the modes or the sizes don't match, and Is it worth considering the alternative solution of removing the mode and size checks from |
As noted, an earlier iteration of #9784 had an issue where I'd carelessly copy-pasted all checks across That in turn caused CPython RuntimeErrors because we were both returning a value from a C extension function while having set an exception, because this function wasn't checking correctly... If this function had behaved correctly CPython-API-wise, I would've spent less time debugging that exception, and more time figuring I was a dummy for copy-pasting blindly :) Given, as you note, that the |
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Sibling of #9784 - an earlier iteration of it uncovered Python complaining about a value being returned while an exception was set.
_transposedid indeed just wholesale toss out the retval of the underlying operation function...