Message414385
See for example:
>>> from pygments.regexopt import regexopt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'regexopt' from 'pygments.regexopt' (/home/jean/repos/pygments/pygments/regexopt.py)
>>> from pygments.regexopt import regex_opt
>>> regexopt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'regexopt' is not defined. Did you mean: 'regex_opt'?
In Python 3.10, there is a nice helpful error message suggesting
how to correct the typo for NameError and AttributeError. Would
it be possible to have the same for ImportError with 'from import'? |
|
Date |
User |
Action |
Args |
2022-03-02 20:42:20 | Jean_Abou_Samra | set | recipients:
+ Jean_Abou_Samra |
2022-03-02 20:42:20 | Jean_Abou_Samra | set | messageid: <1646253740.47.0.0857433223872.issue46902@roundup.psfhosted.org> |
2022-03-02 20:42:20 | Jean_Abou_Samra | link | issue46902 messages |
2022-03-02 20:42:20 | Jean_Abou_Samra | create | |
|