Author xiang.zhang
Recipients barry, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, xiang.zhang
Date 2018-02-27.08:51:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519721514.76.0.467229070634.issue32932@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2018-02-27 08:51:54xiang.zhangsetrecipients: + xiang.zhang, barry, brett.cannon, ncoghlan, eric.snow, serhiy.storchaka
2018-02-27 08:51:54xiang.zhangsetmessageid: <1519721514.76.0.467229070634.issue32932@psf.upfronthosting.co.za>
2018-02-27 08:51:54xiang.zhanglinkissue32932 messages
2018-02-27 08:51:54xiang.zhangcreate