Skip to content

Commit

Permalink
bpo-26656: Improve re.compile documentation (pythonGH-3211)
Browse files Browse the repository at this point in the history
- Link to the regular expressions object documentation
- Clarify that it can be used with more than the two methods currently stated.
  • Loading branch information
cryvate authored and Mariatta committed Aug 28, 2017
1 parent 998f496 commit ed94a8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Doc/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,10 @@ form.

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

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

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

0 comments on commit ed94a8b

Please sign in to comment.