>
> Both accept a tuple. For example:
>
> >>> "foo".startswith(("f", "b"))
> True
> >>> "bar".startswith(("f", "b"))
> True
>
Nice. Now let's do that for str.replace.
>> Also, we do have to saturate the str namespace with all the re
>> functions. We could decide to go for `str.re.stuff`.
>
> Attaching an entire module to a type is probably worse than
> adding a slew of extra methods to the type.
>
Not my point.
str.re would not be the re module, just a namespace where to group all
regex related string methods.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/