Mercurial > cpython-lru_cache-weakref
changeset 87561:5237e7da8a76
#19778: fix a couple of re reprs in the documentation.
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Mon, 25 Nov 2013 22:47:01 +0200 |
| parents | f8ac01a762c1 |
| children | e39db21df580 |
| files | Doc/howto/regex.rst |
| diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Doc/howto/regex.rst Mon Nov 25 11:35:46 2013 -0800 +++ b/Doc/howto/regex.rst Mon Nov 25 22:47:01 2013 +0200 @@ -271,8 +271,8 @@ >>> import re >>> p = re.compile('ab*') - >>> p #doctest: +ELLIPSIS - <_sre.SRE_Pattern object at 0x...> + >>> p + re.compile('ab*') :func:`re.compile` also accepts an optional *flags* argument, used to enable various special features and syntax variations. We'll go over the available @@ -383,8 +383,8 @@ >>> import re >>> p = re.compile('[a-z]+') - >>> p #doctest: +ELLIPSIS - <_sre.SRE_Pattern object at 0x...> + >>> p + re.compile('[a-z]+') Now, you can try matching various strings against the RE ``[a-z]+``. An empty string shouldn't match at all, since ``+`` means 'one or more repetitions'.
