summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/re.rst8
-rw-r--r--Doc/tools/susp-ignored.csv1
-rw-r--r--Misc/NEWS.d/next/Documentation/2019-09-27-23-37-41.bpo-38294.go_jFf.rst1
3 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index df29c4d..7c950bf 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -931,8 +931,8 @@ form.
This is useful if you want to match an arbitrary literal string that may
have regular expression metacharacters in it. For example::
- >>> print(re.escape('python.exe'))
- python\.exe
+ >>> print(re.escape('http://www.python.org'))
+ http://www\.python\.org
>>> legal_chars = string.ascii_lowercase + string.digits + "!#$%&'*+-.^_`|~:"
>>> print('[%s]+' % re.escape(legal_chars))
@@ -955,7 +955,9 @@ form.
.. versionchanged:: 3.7
Only characters that can have special meaning in a regular expression
- are escaped.
+ are escaped. As a result, ``'!'``, ``'"'``, ``'%'``, ``"'"``, ``','``,
+ ``'/'``, ``':'``, ``';'``, ``'<'``, ``'='``, ``'>'``, ``'@'``, and
+ ``"`"`` are no longer escaped.
.. function:: purge()
diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv
index a740862..740850c 100644
--- a/Doc/tools/susp-ignored.csv
+++ b/Doc/tools/susp-ignored.csv
@@ -356,3 +356,4 @@ whatsnew/changelog,,::,default::BytesWarning
whatsnew/changelog,,::,default::DeprecationWarning
library/importlib.metadata,,:main,"EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts')"
library/importlib.metadata,,`,loading the metadata for packages for the indicated ``context``.
+library/re,,`,"`"
diff --git a/Misc/NEWS.d/next/Documentation/2019-09-27-23-37-41.bpo-38294.go_jFf.rst b/Misc/NEWS.d/next/Documentation/2019-09-27-23-37-41.bpo-38294.go_jFf.rst
new file mode 100644
index 0000000..0bde8c8
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2019-09-27-23-37-41.bpo-38294.go_jFf.rst
@@ -0,0 +1 @@
+Add list of no-longer-escaped chars to re.escape documentation \ No newline at end of file