Thomas Lotze thomas at
Thu Jul 14 14:30:54 CEST 2005

Thomas Lotze wrote:

> And I wonder whether there shouldn't be str.findany and
> str.iterfindany, which takes a sequence as an argument and returns the
> next match on any element of it.

On second thought, that wouldn't gain much on a loop over finding each
sequence, but add more complexity than it is worth. What would be more
useful, especially thinking of a C implementation, is str.findanyof and
str.findnoneof. They take a string as an argument and find the first
occurrence of any char in that string or any char not in that string,
resp. Especially finding any char not among a given few needs a hoop to
jump through now, if I didn't miss anything.


More information about the Python-list mailing list