Skip to content

gh-102211: Document re.{Pattern,Match}’s existence #102212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Doc/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,8 @@ Regular Expression Objects
Compiled regular expression objects support the following methods and
attributes:

.. class: Pattern

.. method:: Pattern.search(string[, pos[, endpos]])

Scan through *string* looking for the first location where this regular
Expand Down Expand Up @@ -1256,6 +1258,7 @@ when there is no match, you can test whether there was a match with a simple

Match objects support the following methods and attributes:

.. class: Match

.. method:: Match.expand(template)

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ Other concrete types
These types should be directly imported from ``typing`` instead.

.. deprecated:: 3.9
Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``.
Classes :class:`re.Pattern` and :class:`re.Match` now support ``[]``.
See :pep:`585` and :ref:`types-genericalias`.

.. class:: Text
Expand Down