On Tue, Mar 28, 2017 at 8:37 AM, Chris Angelico <[email protected]> wrote:
>
> Yes, but if the "in" operator is used, it would still work, because
> r"..." is a str, and "str" in "string" is meaningful.
>
> But I think a better solution will be for regex literals to be
> syntax-highlighted differently. If they're a truly-supported syntactic
> feature, they can be made visually different in your editor, making
> the distinction blatantly obvious.
>
> That said, though, I'm -1 on this. Currently, every prefix letter has
> its own meaning, and broadly speaking, combining them combines their
> meanings. An re"..." literal should be a raw "e-string", whatever that
> is, so I would expect that e"..." is the same kind of thing but with
> different backslash handling.
> <http://python.org/psf/codeofconduct/>
>

Fair enough, I haven't followed this thread too closely and didn't consider
the "in" operator being used. Even then I find it unlikely that confusing
re'...' with r'...' and not noticing would turn out to be an issue.

That being said, I'm also -1 on this, especially now after your point on
"e-string". Adding these re-strings would straight out prevent e-string
from ever being implemented.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to