Message261049
Python 3.5.1 x86-64, Windows 10
I created a translation map that translated some characters to None and others to strings and found that in some cases str.translate() will duplicate one of the untranslated characters in the returned string.
How to reproduce:
table = str.maketrans({'a': None, 'b': 'cd'})
'axb'.translate(table)
Expected result:
'xcd'
Actual result:
'xxcd'
Mapping 'a' to '' instead of None will produce the desired effect. |
|
Date |
User |
Action |
Args |
2016-03-01 13:51:44 | ben.knight | set | recipients:
+ ben.knight |
2016-03-01 13:51:44 | ben.knight | set | messageid: <1456840304.03.0.420145350869.issue26464@psf.upfronthosting.co.za> |
2016-03-01 13:51:43 | ben.knight | link | issue26464 messages |
2016-03-01 13:51:43 | ben.knight | create | |
|