Fix wrong type name in __repr__ TypeError message#678
Fix wrong type name in __repr__ TypeError message#678graalvmbot merged 1 commit intooracle:masterfrom
__repr__ TypeError message#678Conversation
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
__repr__ TypeError message
__repr__ TypeError message__repr__ TypeError message
ec7b876 to
d7e91a2
Compare
Signed-off-by: Jeongseop Lim <jeongseop_lim@korea.ac.kr>
d7e91a2 to
481d014
Compare
|
Thank you for signing the OCA. |
msimacek
left a comment
There was a problem hiding this comment.
Thank you for the contribution, we'll merge it shortly
|
Thank you for the review! |
PullRequest: graalpython/4318
Description
Fixes #676.
When
__repr__returns a non-string value, theTypeErrormessage incorrectly reports the type of the object being repr'd instead of the return value's type, diverging from CPython.AS-IS
(type of the object)
TO-BE
(type of the return value, matching CPython)
Change
Pass
result(the__repr__return value) instead ofobj(the object being repr'd) toraiseTypeErrorinPyObjectReprAsObjectNode.java. The equivalent__str__path inPyObjectStrAsObjectNode.javaalready does this correctly.