This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Help for ImportError should show a more useful signature.
Type: enhancement Stage: needs patch
Components: Interpreter Core Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, eric.snow, terry.reedy
Priority: normal Keywords:

Created on 2014-05-26 04:27 by eric.snow, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg219124 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-05-26 04:27

  __init__(self, /, *args, **kwargs)


  __init__(self, /, *args, name=None, path=None, **kwargs)

Even that is still a little vague, but at least it doesn't gloss over the kwonly args added in 3.3.
msg219413 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-05-30 18:58
Your example in #21578 suggests that **kwargs should be deleted.
*args is right.
>>> ImportError(3, 'a')
ImportError(3, 'a')

Should not this be fixed by ArgClinic conversion, and is not there an issue for that for exceptions?
msg219421 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-05-30 19:52
Yeah, I also noticed that about **kwargs, but only a little while later and didn't get around to making a note here.  As to ArgumentClinic, I imagine that this could be fixed when ModuleType (in Objects/moduleobject.c) gets converted to use it.  I don't know too much about the limitations though--maybe that's why it wasn't converted already.
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65776
2020-03-18 18:21:33brett.cannonsetversions: + Python 3.9, - Python 3.4, Python 3.5
2014-05-30 19:52:44eric.snowsetmessages: + msg219421
2014-05-30 18:58:24terry.reedysetnosy: + terry.reedy
messages: + msg219413
2014-05-26 04:27:28eric.snowcreate