[issue36498] combining dict comprehensing and lists lead to IndexError

2019-04-01 Thread SilentGhost
SilentGhost added the comment: IndexError is caused by the fact that split results in an empty list. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior ___ Python tracker

[issue36498] combining dict comprehensing and lists lead to IndexError

2019-04-01 Thread Benjamin Krala
Benjamin Krala added the comment: Correction of typo in the last sentence: To avoid the bug you can change the 1 into -1 -- ___ Python tracker ___ ___

[issue36498] combining dict comprehensing and lists lead to IndexError

2019-04-01 Thread Benjamin Krala
New submission from Benjamin Krala : Following code snipped leads to an IndexError in the last line. It basically puts EN_cmw into a dict where is a split on '->'. It avoid the bug you can change the 1 into -1. (By definition it shouldnt make a difference) EN_cmw = '''abandonned->abandoned ab