Berker Peksag added the comment:
Thanks for the report. This is a duplicate of issue 21578.
--
nosy: +berker.peksag
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Misleading error message when ImportError called with invalid
keyword args
__
Brett Cannon added the comment:
I bet it's because of
https://hg.python.org/cpython/file/tip/Objects/exceptions.c#l64 which is called
by https://hg.python.org/cpython/file/tip/Objects/exceptions.c#l643 .
--
components: +Interpreter Core
nosy: +brett.cannon
type: -> enhancement
__
New submission from Sebastian Kreft:
ImportError now supports the keyword arguments name and path. However, when
passing invalid keyword arguments, the reported error is misleading, as shown
below.
In [1]: ImportError('lib', name='lib')
Out[1]: ImportError('lib')
In [2]: ImportError('lib', na