Message312739
I also timed this for a `_tran` optimization (instead of looping and doing the `ord`), but it didn't really make a difference.
```
_tran = defaultdict(lambda: 'x')
_tran.update({40: 40, # ord('(')
91: 40, # ord('[')
123: 40, # ord('{')
41: 41, # ord(')')
93: 41, # ord(']')
125: 41, # ord('}')
34: 34, # ord('"')
39: 39, # ord("'")
92: 92, # ord("\\")
10: 10, # ord("\n")
35: 35, # ord("#")
})
```
I think both the loop and the above mapping are equally difficult to understand without stopping to think about it. |
|
Date |
User |
Action |
Args |
2018-02-24 21:22:09 | terry.reedy | unlink | issue32880 messages |
2018-02-24 18:23:23 | cheryl.sabella | set | recipients:
+ cheryl.sabella, terry.reedy, serhiy.storchaka |
2018-02-24 18:23:23 | cheryl.sabella | set | messageid: <1519496603.03.0.467229070634.issue32880@psf.upfronthosting.co.za> |
2018-02-24 18:23:23 | cheryl.sabella | link | issue32880 messages |
2018-02-24 18:23:22 | cheryl.sabella | create | |
|