Xiang Zhang <angwe...@126.com> added the comment: I would like the error message improved. The Python message is obviously much better than the C message. It sends the cause to your eyes. Different messages issued from similar statements are confusing. And due to the non-ideal message is generated by C, the traceback is more limited.
tmpdir/ - __init__.py . __all__ = [1] - a.py . __all__ = [1] >>> from tmpdir import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<frozen importlib._bootstrap>", line 1031, in _handle_fromlist File "<frozen importlib._bootstrap>", line 1026, in _handle_fromlist TypeError: Item in tmpdir.__all__ must be str, not int >>> from tmpdir.a import * Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: attribute name must be string, not 'float' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32932> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com