You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that when the value is a string, the result includes quotes. This behavior is a bit inconvenient when the exception message needs to be forwarded to a user-facing context (e.g., API error message), since the quotes are not semantically part of the message.
Was there a specific reason for using repr() here (e.g., debugging consistency, preserving non-string types), or could str(self.value) be more appropriate to make the message cleaner for string values?
Thank you for your time and for maintaining such a well-designed library!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I noticed that the
MachineErrorclass defines__str__asThis means that when the value is a string, the result includes quotes. This behavior is a bit inconvenient when the exception message needs to be forwarded to a user-facing context (e.g., API error message), since the quotes are not semantically part of the message.
Was there a specific reason for using repr() here (e.g., debugging consistency, preserving non-string types), or could str(self.value) be more appropriate to make the message cleaner for string values?
Thank you for your time and for maintaining such a well-designed library!
Beta Was this translation helpful? Give feedback.
All reactions