[issue7963] Misleading error message from object(arg)

R. David Murray report at bugs.python.org
Tue Feb 19 04:12:18 CET 2013


R. David Murray added the comment:

I've applied this.  Note that this makes the object.__new__ message consistent with, say, str.__new__.  That is, 'str.__new__(str, 2, 3)' results in the message "TypeError: str() argument 2 must be str, not int".  So the new object error message is consistent with that convention:  object.__new__(object, 1) now gives "TypeError: object() takes no parameters"

----------
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7963>
_______________________________________


More information about the Python-bugs-list mailing list