Skip to content

Commit 777ceca

Browse files
cryvateGadgetSteve
authored andcommitted
bpo-26656: Improve re.compile documentation (pythonGH-3211)
- Link to the regular expressions object documentation - Clarify that it can be used with more than the two methods currently stated.
1 parent 030f76b commit 777ceca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/re.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,10 @@ form.
490490

491491
.. function:: compile(pattern, flags=0)
492492

493-
Compile a regular expression pattern into a regular expression object, which
494-
can be used for matching using its :func:`~regex.match` and
495-
:func:`~regex.search` methods, described below.
493+
Compile a regular expression pattern into a :ref:`regular expression object
494+
<re-objects>`, which can be used for matching using its
495+
:func:`~regex.match`, :func:`~regex.search` and other methods, described
496+
below.
496497

497498
The expression's behaviour can be modified by specifying a *flags* value.
498499
Values can be any of the following variables, combined using bitwise OR (the

0 commit comments

Comments
 (0)