21.11.17 04:20, Stephen J. Turnbull пише:
Serhiy Storchaka writes:
  > 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.

I doubt that Japanese would want it.  I do use \N{IDEOGRAPHIC SPACE} a
bit as a *target* of regular expressions, but I would never want it as
non-syntactic in re.VERBOSE.  (Of course, I'm not a native Japanese, but
I have never heard a Japanese developer wish for use of that character
in any programming language, outside of literal strings.)

  > In particularly I don't know how helpful would be supporting
  > right-to-left and left-to-right marks in verbose regular expressions

That's a good question.  Interpretation and display of R2L in
programming constructs came up briefly in the discussions about BIDI
on the emacs-devel list.  I'll ask Eli Zaretskii, who implemented it
for Emacs.

Thank you Stephen. I would prefer to not change anything (because supporting additional whitespaces will complicate and slow down the code, and can add subtle bugs, add likely will add a confusion for users). But I want to know whether there is a real need in supporting additional whitespaces and rtl and ltr marks in regular expressions and Python syntax.

_______________________________________________
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