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.

Author serhiy.storchaka
Recipients brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2016-09-27.18:02:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
ImportError.__init__ sets only specified attributes ("msg", "name" or "path"), and left not explicitly specified attributes unchanged.

>>> err = ImportError('test', name='name')
>>> err.args, err.msg,, err.path
(('test',), 'test', 'name', None)
>>> err.__init__(path='path')
>>> err.args, err.msg,, err.path
((), 'test', 'name', 'path')

In above example err.__init__(path='path') sets attributes "args" and "path", but not "msg" and "name".

I'm not sure whether can this be considered as a bug.
Date User Action Args
2016-09-27 18:02:52serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, eric.snow
2016-09-27 18:02:52serhiy.storchakasetmessageid: <>
2016-09-27 18:02:52serhiy.storchakalinkissue28289 messages
2016-09-27 18:02:52serhiy.storchakacreate