Michel Desmoulin wrote:
Also, we do have to saturate the str namespace with all the re
functions. We could decide to go for `str.re.stuff`.


However, note that this is not as simple as just adding a
class attribute to str that references the re module,
since presumably you want to be able to write

   mystring.re.match(pattern)

instead of having to write

   mystring.re.match(pattern, mystring)

or

   str.re.match(pattern, mystring)

which would mostly defeat the purpose.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to