Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 613a97e

Browse files
committed
#19778: fix a couple of re reprs in the documentation.
1 parent 1048fb5 commit 613a97e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/howto/regex.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ performing string substitutions. ::
271271

272272
>>> import re
273273
>>> p = re.compile('ab*')
274-
>>> p #doctest: +ELLIPSIS
275-
<_sre.SRE_Pattern object at 0x...>
274+
>>> p
275+
re.compile('ab*')
276276

277277
:func:`re.compile` also accepts an optional *flags* argument, used to enable
278278
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::
383383

384384
>>> import re
385385
>>> p = re.compile('[a-z]+')
386-
>>> p #doctest: +ELLIPSIS
387-
<_sre.SRE_Pattern object at 0x...>
386+
>>> p
387+
re.compile('[a-z]+')
388388

389389
Now, you can try matching various strings against the RE ``[a-z]+``. An empty
390390
string shouldn't match at all, since ``+`` means 'one or more repetitions'.

0 commit comments

Comments
 (0)