Message136883
Fair enough.
I think it would make sense for the string methods to also accept single ints where possible as well:
For haystack and needles both strings:
[haystack.find(n) for n in needles]
For both bytes, it's a bit contortionist:
[haystack.find(needles[i:i+1]) for i in range(len(needles))]
One ends up doing a lot of the [i:i+1] bending when using bytes functions. |
|
Date |
User |
Action |
Args |
2011-05-25 18:34:54 | max-alleged | set | recipients:
+ max-alleged, rhettinger, terry.reedy, petri.lehtinen |
2011-05-25 18:34:54 | max-alleged | set | messageid: <1306348494.07.0.124131903365.issue12170@psf.upfronthosting.co.za> |
2011-05-25 18:34:53 | max-alleged | link | issue12170 messages |
2011-05-25 18:34:53 | max-alleged | create | |
|