From: Ezio Melotti Date: Mon, 25 Nov 2013 20:47:01 +0000 (+0200) Subject: #19778: fix a couple of re reprs in the documentation. X-Git-Tag: v3.4.0b2~485 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=613a97e193466d70904e767b354e29edfd1be0c3;p=thirdparty%2FPython%2Fcpython.git #19778: fix a couple of re reprs in the documentation. --- diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst index 8a089e4a2c89..fbe763b3f2a3 100644 --- a/Doc/howto/regex.rst +++ b/Doc/howto/regex.rst @@ -271,8 +271,8 @@ performing string substitutions. :: >>> 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 @@ Python interpreter, import the :mod:`re` module, and compile a RE:: >>> 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'.