Message142038
There are occasions when you want to do string slicing, often of the form:
pos = my_str.index(x)
endpos = my_str.index(y)
substring = my_str[pos : endpos]
To me that suggests that if UTF-8 is used then it may be worth profiling to see whether caching the last 2 positions would be beneficial. |
|
Date |
User |
Action |
Args |
2011-08-13 20:57:40 | mrabarnett | set | recipients:
+ mrabarnett, terry.reedy, pitrou, Arfrever, r.david.murray, tchrist |
2011-08-13 20:57:39 | mrabarnett | set | messageid: <1313269060.0.0.568845256971.issue12729@psf.upfronthosting.co.za> |
2011-08-13 20:57:39 | mrabarnett | link | issue12729 messages |
2011-08-13 20:57:39 | mrabarnett | create | |
|