R. David Murray added the comment: See issue 7963 for a clue to why you get this message. That is, it is object.__new__ that is getting called, not object.__init__, and __new__ methods result in different error messages than __init__ methods. I don't know if there is a practical way to make it better. For example you also have this:
>>> a = A('abc', 'xyz') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: decoding str is not supported >>> a = A('abc', 2, 3, 54) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: str() takes at most 3 arguments (4 given) ---------- nosy: +r.david.murray _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21728> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com