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', name='lib', foo='foo')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-5af12651187f> in <module>()
----> 1 ImportError('lib', name='lib', foo='foo')
TypeError: ImportError does not take keyword arguments
----------
messages: 250850
nosy: Sebastian Kreft
priority: normal
severity: normal
status: open
title: Misleading error when initing ImportError
versions: Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25142>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com