Message277533
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. |
|
Date |
User |
Action |
Args |
2016-09-27 18:02:52 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, eric.snow |
2016-09-27 18:02:52 | serhiy.storchaka | set | messageid: <1474999372.21.0.472143563436.issue28289@psf.upfronthosting.co.za> |
2016-09-27 18:02:52 | serhiy.storchaka | link | issue28289 messages |
2016-09-27 18:02:52 | serhiy.storchaka | create | |
|