Terry J. Reedy added the comment:

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.

----------
nosy: +terry.reedy
stage:  -> test needed
versions: +Python 3.7 -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28702>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to