[issue7963] Misleading error message from object(arg)

2013-02-18 Thread R. David Murray
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

[issue7963] Misleading error message from object(arg)

2013-02-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0082b7bf9501 by R David Murray in branch '2.7': #7963: fix error message when 'object' called with arguments. http://hg.python.org/cpython/rev/0082b7bf9501 -- ___ Python tracker

[issue7963] Misleading error message from object(arg)

2013-02-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset b5adf2a30b73 by R David Murray in branch '3.2': #7963: fix error message when 'object' called with arguments. http://hg.python.org/cpython/rev/b5adf2a30b73 New changeset 0e438442fddf by R David Murray in branch '3.3': #7963: fix error message when '

[issue7963] Misleading error message from object(arg)

2010-02-19 Thread Georg Brandl
Georg Brandl added the comment: The latter is no inconsistency; tuples are immutable, lists are not. Therefore, for lists, __init__ is the initializer, not __new__. In order not to duplicate argument checking, __new__ does nothing special with them. -- nosy: +georg.brandl _

[issue7963] Misleading error message from object(arg)

2010-02-18 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : >>> object(1) Traceback (most recent call last): File "", line 1, in TypeError: object.__new__() takes no parameters This is misleading because object.__new__() takes one parameter: >>> object.__new__(object) I suggest changing "object.__new__()