[Python-ideas] str.find() and friends support a lists of inputs

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 18 02:44:05 CEST 2014


Andrew Barnert wrote:
> There are a few cases where Python deals with this problem by treating tuples
> specially (e.g., % formatting), but I don't think anyone wants to extend that
> solution.

The startswith() and endswith() methods already accept a tuple
in place of a string, and require it to be a tuple. So I think
it would be entirely reasonable to do the same for replace().

-- 
Greg


More information about the Python-ideas mailing list