Message292799
Python 2.7 allows indexing an Exception object to access its args list.
>>> e=Exception('foo','bar','baz')
>>> assert e[0] is e.args[0]
This doesn't work in 3.5:
>>> e=Exception('foo','bar','baz')
>>> e.args[0]
'foo'
>>> e[0]
TypeError: 'Exception' object is not subscriptable
This conversion (e[x] -> e.args[x]) seems like it ought to be fairly straightforward to support in 2to3. |
|
Date |
User |
Action |
Args |
2017-05-02 19:31:56 | dlenski | set | recipients:
+ dlenski |
2017-05-02 19:31:56 | dlenski | set | messageid: <1493753516.03.0.383972145792.issue30238@psf.upfronthosting.co.za> |
2017-05-02 19:31:56 | dlenski | link | issue30238 messages |
2017-05-02 19:31:55 | dlenski | create | |
|