[Python-ideas] Give regex operations more sugar

Michel Desmoulin desmoulinmichel at gmail.com
Wed Jun 13 16:59:41 EDT 2018



Le 13/06/2018 à 22:53, David Mertz a écrit :
> On Wed, Jun 13, 2018, 4:44 PM Michel Desmoulin
> <desmoulinmichel at gmail.com <mailto:desmoulinmichel at gmail.com>> wrote:
> 
>     several startswith() and endswith() require a loop, but we could
>     make them accept *args.
> 
> 
> You mean something like:
> 
> "Lorem ipsum".startswith(('Lo', 'Hi', 'Foo'))
> 
> You might want to check the time machine.
> 

Sweat. Now let's do that for replace :)



More information about the Python-ideas mailing list