Message410054
var = "u2"
var.strip()[0]
Works as expected, except that it returns IndexError (instead of "u") if used in a list comprehension -- at least, that's where I found it. Attached example script illustrates the issue.
Call it with "mytest N" where N is 1 (fails), 2 (works), 3 (fails).
mytest 1 -- KeyError expected; this was due to infile design change
adding a digit to previously single char code
mytest 2 -- workaround to actual issue in next test
mytest 3 -- adding [0] fails when used in list comprehension |
|
Date |
User |
Action |
Args |
2022-01-07 23:22:39 | NetAlien | set | recipients:
+ NetAlien |
2022-01-07 23:22:39 | NetAlien | set | messageid: <1641597759.71.0.591724063363.issue46302@roundup.psfhosted.org> |
2022-01-07 23:22:39 | NetAlien | link | issue46302 messages |
2022-01-07 23:22:39 | NetAlien | create | |
|