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 <1474999372.21.0.472143563436.issue28289@psf.upfronthosting.co.za>
In-reply-to
Content
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.name, err.path
(('test',), 'test', 'name', None)
>>> err.__init__(path='path')
>>> err.args, err.msg, err.name, 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.
History
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: <1474999372.21.0.472143563436.issue28289@psf.upfronthosting.co.za>
2016-09-27 18:02:52serhiy.storchakalinkissue28289 messages
2016-09-27 18:02:52serhiy.storchakacreate