[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

Serhiy Storchaka report at bugs.python.org
Tue Nov 15 15:58:52 EST 2016


Serhiy Storchaka added the comment:

Approximate counts.

C code:
ob_type->tp_name        161
Py_TYPE(...)->tp_name   285

Python code:
__class__.__name__      224
__class__.__qualname__   23
type(...).__name__      112
type(...).__qualname__    5

Is it worth changing about 800 places in CPython code? Not counting third-party code.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list