summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-03-10 00:52:28 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-03-10 00:52:28 (GMT)
commitb5ac4d7eaab34ee4cd8697c9bdea8e24838374b4 (patch)
tree27d4c1d1ab7e8c35361d0b57f75d324929b7743a
parentced82ef752ce5f18c4634d3f39d682977a05e8d0 (diff)
downloadcpython-b5ac4d7eaab34ee4cd8697c9bdea8e24838374b4.zip
cpython-b5ac4d7eaab34ee4cd8697c9bdea8e24838374b4.tar.gz
cpython-b5ac4d7eaab34ee4cd8697c9bdea8e24838374b4.tar.bz2
whatsnew: expand re.fullmatch entry with the motivation for the feature.
-rw-r--r--Doc/whatsnew/3.4.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 9e87b42..33461eb 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1172,9 +1172,12 @@ affect the behaviour of :func:`help`.
re
--
-Added :func:`re.fullmatch` function and :meth:`regex.fullmatch` method,
-which anchor the pattern at both ends of the string to match.
-(Contributed by Matthew Barnett in :issue:`16203`.)
+New :func:`~re.fullmatch` function and :meth:`.regex.fullmatch` method anchor
+the pattern at both ends of the string to match. This provides a way to be
+explicit about the goal of the match, which avoids a class of subtle bugs where
+``$`` characters get lost during code changes or the addition of alternatives
+to an existing regular expression. (Contributed by Matthew Barnett in
+:issue:`16203`.)
The repr of :ref:`regex objects <re-objects>` now includes the pattern
and the flags; the repr of :ref:`match objects <match-objects>` now