[Python-ideas] Ignorable whitespaces in the re.VERBOSE mode
Serhiy Storchaka
storchaka at gmail.com
Mon Nov 20 03:59:15 EST 2017
20.11.17 10:13, Stephen J. Turnbull пише:
> Otherwise I'm with Paul, who writes:
>
> > My instinct is not to worry about it unless someone has actually hit
> > the issue in practice and raised a bug.
>
> After the tabs vs. spaces fiasco, I lean steeply to the right for code
> -- including embedded languages like regexes. *We* say what is
> allowed there, and *you* can find an editor that does it our way.
I agree. But if there is a special part of the Unicode standard for
Pattern White Spaces which includes non-ASCII characters, perhaps there
is a need in them. I asked for the case if Python developers with very
different cultures have need in additional whitespaces in regular
expressions, but I don't know. Seems nobody has claimed their need.
In particularly I don't know how helpful would be supporting
right-to-left and left-to-right marks in verbose regular expressions (or
even in Python code), or this will just add confusion? Unicode
identifiers already can be misused for confusion due to homoglyphs. The
problem is not that correctly looking program can be rejected by the
compiler, but that the program can work differently from expected
because it uses different names that look the same.
More information about the Python-ideas
mailing list