New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__unicode__ breaks for exception class objects #43935
Comments
PyObject_Unicode and the unicode function stopped >>> unicode(ImportError)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: descriptor '__unicode__' of
'exceptions.BaseException' object needs an argument It should work analogously to str: >>> str(ImportError)
"<type 'exceptions.ImportError'>" |
Logged In: YES This is because exceptions now define a proper __unicode__() Unless some knows a better way (short of defining a |
Logged In: YES I think the way which is consistent with the current Python (Parenthetical remark. In the binding between Python and my language Kogut I'm This was a different issue than the topic of this bug, was The present problem is somewhat dual: now it's me who calls End of parenthetical remark.) Anyway, I'm afraid the issue is a symptom of a deeper It seems that Python doesn't attempt to use the second The set of methods which have C slots would seem to be just Fortunately it doesn't matter much in practice because the |
Logged In: YES rev. 51837 and rev. 51838 have the fix in the trunk and 2.5, |
Note that this causes problems with converting Exceptions to unicode - |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: