[python] Proper prefixing for shape-related methods#3236
Conversation
5a4a620 to
5c55e5f
Compare
5dc298d to
01e22d6
Compare
jp-dark
left a comment
There was a problem hiding this comment.
It can be a real pain to correctly maintain the error messages where you pass in the function names. I'm not too worried if there is an one-off need to do it just in this case, but if this is a pattern we will continue to need maybe we can file a story to investigate alternatives?
@jp-dark quite the contrary! This is methodical and intentional for the very sake of maintainability.
|
|
I very much do not want to lose the ability to flow user-level names (what they actually typed) down to exceptions thrown at lower levels. It's a long-standing curse that a user sees a cryptic exception and can't map it to what they typed. Propagating a user-level function name is important for that, and if anything, we should do this more often, not less. If your concern is double entry at the Python/R-level callsites, maybe we can use something like ? |
Yes - this. I worked with a large Fortran codebase that required the developer to add the function name to the error messages and it led to a lot of incorrect error messages due to a combo of copy/paste errors and forgetting to update message string when a function name change occurred. So long as we are automatically getting the function names from Python/R, I'm all for propagating this pattern. |
|
@jp-dark awesome!!! :) For reference, the R analog: |
Issue and/or context: As tracked on issue #2407 / [sc-51048].
Note that the intended Python and R API changes are all agreed on and finalized as described in #2407.
Changes:
Resolve discrepancies between function names and #2407.
Notes for Reviewer: