Message281160
I have doubts also.
The issue is the same for NotImplemented, though the occurrence is much rarer, and similar for Ellipsis.
>>> NotImplemented.foo
Traceback (most recent call last):
File "<pyshell#19>", line 1, in <module>
NotImplemented.foo
AttributeError: 'NotImplementedType' object has no attribute 'foo'
>>> Ellipsis.foo
Traceback (most recent call last):
File "<pyshell#20>", line 1, in <module>
Ellipsis.foo
AttributeError: 'ellipsis' object has no attribute 'foo'
Replacing the type name with the object name works for this message, but not for the type errors.
TypeError: unsupported operand type(s) for +: 'None' and 'int'
is wrong.
Replacing 'NoneType' with 'None' in error messages will break code that does something like "if 'NoneType' in err.args[0]" in an exception message. The same replacement would have to be make in user code. Fortunately, it would continue to work with older versions. |
|
Date |
User |
Action |
Args |
2016-11-18 19:42:22 | terry.reedy | set | recipients:
+ terry.reedy, brett.cannon, gward, r.david.murray, serhiy.storchaka |
2016-11-18 19:42:22 | terry.reedy | set | messageid: <1479498142.78.0.410778139165.issue28702@psf.upfronthosting.co.za> |
2016-11-18 19:42:22 | terry.reedy | link | issue28702 messages |
2016-11-18 19:42:22 | terry.reedy | create | |
|