diff options
author | Georg Brandl <georg@python.org> | 2010-08-01 21:09:16 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-08-01 21:09:16 (GMT) |
commit | 4c07cdc0c71e9e996037271b741da6376122f146 (patch) | |
tree | 1e09f17e1af9f34438fbd76874003097363439ff | |
parent | e3215819698ec0d25cd3a031aba8ab7f2a9f8678 (diff) | |
download | cpython-4c07cdc0c71e9e996037271b741da6376122f146.zip cpython-4c07cdc0c71e9e996037271b741da6376122f146.tar.gz cpython-4c07cdc0c71e9e996037271b741da6376122f146.tar.bz2 |
Merged revisions 83217 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r83217 | georg.brandl | 2010-07-29 13:15:36 +0200 (Do, 29 Jul 2010) | 1 line
Remove Python 1.5 compatibility note.
........
-rw-r--r-- | Doc/library/re.rst | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 3f9d923..2496835 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -485,7 +485,7 @@ form. Note that for backward compatibility, the :const:`re.U` flag still exists (as well as its synonym :const:`re.UNICODE` and its embedded - counterpart ``(?u)``), but these are redundant in Python 3.0 since + counterpart ``(?u)``), but these are redundant in Python 3 since matches are Unicode by default for strings (and Unicode matching isn't allowed for bytes). @@ -504,7 +504,7 @@ form. Make ``\w``, ``\W``, ``\b``, ``\B``, ``\s`` and ``\S`` dependent on the current locale. The use of this flag is discouraged as the locale mechanism is very unreliable, and it only handles one "culture" at a time anyway; - you should use Unicode matching instead, which is the default in Python 3.0 + you should use Unicode matching instead, which is the default in Python 3 for Unicode (str) patterns. @@ -888,10 +888,7 @@ Match Objects Return a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The *default* argument is used for groups that - did not participate in the match; it defaults to ``None``. (Incompatibility - note: in the original Python 1.5 release, if the tuple was one element long, a - string would be returned instead. In later versions (from 1.5.1 on), a - singleton tuple is returned in such cases.) + did not participate in the match; it defaults to ``None``. For example: @@ -1113,7 +1110,7 @@ recursion, you may encounter a :exc:`RuntimeError` exception with the message >>> re.match('Begin (\w| )*? end', s).end() Traceback (most recent call last): File "<stdin>", line 1, in ? - File "/usr/local/lib/python2.5/re.py", line 132, in match + File "/usr/local/lib/python3.1/re.py", line 132, in match return _compile(pattern, flags).match(string) RuntimeError: maximum recursion limit exceeded |