This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Expose regular expression and match objects types in the re module
Type: enhancement Stage: resolved
Components: Extension Modules, Library (Lib), Regular Expressions Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: 30398 Superseder:
Assigned To: serhiy.storchaka Nosy List: ezio.melotti, gvanrossum, levkivskyi, mrabarnett, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-05-18 09:17 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1646 merged serhiy.storchaka, 2017-05-18 09:22
Messages (4)
msg293914 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-18 09:17
Proposed patch adds re.Patter and re.Match types (names are conforming with the typing module) that represent the types of compiled regular expressin objects and match objects. The purpose of this is exposing the documentation of the methods of these objects in the module documentation produced by pydoc.

The patch also changes the __module__ attribute of these classes and re.error (this enhances the help and repr and increases pickle compatibility of re.error), adds docstrings for re.error and many descriptors, and fixes few other docstrings.
msg293917 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-18 09:49
The part with re.error docstring is extracted in separate issue30398. It should be backported.
msg294918 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-06-01 08:14
Added GvR and Ivan because this is related to the typing module. This change allows re.Patter and re.Match be just imported from the re module.
msg303714 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-04 17:09
New changeset 0b5e61ddca73ad4fe597fb15065115b0285c8849 by Serhiy Storchaka in branch 'master':
bpo-30397: Add re.Pattern and re.Match. (#1646)
https://github.com/python/cpython/commit/0b5e61ddca73ad4fe597fb15065115b0285c8849
History
Date User Action Args
2022-04-11 14:58:46adminsetgithub: 74582
2017-10-04 17:19:41serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-10-04 17:09:51serhiy.storchakasetmessages: + msg303714
2017-06-01 08:19:05serhiy.storchakasetnosy: + levkivskyi
2017-06-01 08:14:30serhiy.storchakasetnosy: + gvanrossum
messages: + msg294918
2017-05-18 09:50:07serhiy.storchakasetdependencies: + Add a docstring for re.error
2017-05-18 09:49:56serhiy.storchakasetmessages: + msg293917
2017-05-18 09:22:39serhiy.storchakasetpull_requests: + pull_request1741
2017-05-18 09:17:51serhiy.storchakacreate