On 13/06/18 12:06, Ken Hilton wrote:
Hi all,

Regexes are really useful in many places, and to me it's sad to see the
builtin "re" module having to resort to requiring a source string as an
argument. It would be much more elegant to simply do "s.search(pattern)"
than "re.search(pattern, s)".
I suggest building all regex operations into the str class itself, as well
as a new syntax for regular expressions.
[snip]
Thoughts?

My first, most obvious thought is that Python is not Perl, and does not encourage people to reach for regular expressions at every opportunity. That said, I don't see how having a special delimiter syntax for something that could just as well be a string is a help.

--
Rhodri James *-* Kynesim Ltd
_______________________________________________
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