>> I suggest building all regex operations into the str class itself, as well >> as a new syntax for regular expressions. > > There are many different regular expression implementation (regex, > re2). How to make ``s.search(pattern)`` work with all of them? > You don't, they work stand alone anyway. Besides, nobody is proposing to retire the re module either.
But if it's really important, you can make hooks to provide the implementation like we did with breakpoint(). I really wish, however, than we separate the issue of adding the methods on the str object, and making literals. I know that literals are going to be rejected, "python is not perl", etc. But the str methods are quite an interesting idea. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/