On 2020-09-28 at 23:10:24 -0000,
Giang Le <giang.lh0...@gmail.com> wrote:

> I would like to propose an idea for the regular expression module
> re.search(Pattern, Input) to support List[str] input type.

> So it will return a matched object list if the input is a string
> list. Otherwise, it will return a normal matched object, if the input
> is a normal string

How would that change be better than a new function:

    def regex_search_list(regex, pattern, list_of_inputs):
        [regex.search(pattern, input) for input in list_of_inputs]

(or possibly an equivalent method of regexen)?
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QSOAHKIKTJMYEWT24L6NTYIXSFLPT5LP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to