This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author max-alleged
Recipients max-alleged, petri.lehtinen, rhettinger, terry.reedy
Date 2011-05-25.18:34:53
SpamBayes Score 3.6579266e-05
Marked as misclassified No
Message-id <>
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:54max-allegedsetrecipients: + max-alleged, rhettinger, terry.reedy, petri.lehtinen
2011-05-25 18:34:54max-allegedsetmessageid: <>
2011-05-25 18:34:53max-allegedlinkissue12170 messages
2011-05-25 18:34:53max-allegedcreate