This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Eliminate Perl legacy in re flag names
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.0
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, mark
Priority: normal Keywords:

Created on 2008-05-14 12:40 by mark, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg66817 - (view) Author: Mark Summerfield (mark) * Date: 2008-05-14 12:40
The re module has the following flags (amongst others):

re.X == re.VERBOSE
re.S == re.DOTALL

The short forms of both these flags are clearly taken from Perl, but
they don't seem necessary for Python and are confusing since all the
other short names start with the same letter as the long name, e.g.,
re.I == re.IGNORECASE and re.M == re.MULTILINE.

Why not add re.V for re.VERBOSE and re.D for re.DOTALL and kill re.X and
re.S and say a final farewell to Perl?
msg66819 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-05-14 15:08
Please keep them.  They correspond to the (?x) and (?s) syntax that is
supported inside the regex.

Perl compatibility is a feature, not a bug for the re module.
Date User Action Args
2022-04-11 14:56:34adminsetgithub: 47100
2008-05-14 15:09:10gvanrossumsetstatus: open -> closed
resolution: wont fix
messages: + msg66819
nosy: + gvanrossum
2008-05-14 12:40:47markcreate