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: Add docstrings to regular expression match objects
Type: enhancement Stage: resolved
Components: Documentation, Regular Expressions Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: a.kasyanov, asvetlov, docs@python, ezio.melotti, mrabarnett, python-dev, rhettinger, serhiy.storchaka
Priority: normal Keywords: easy, patch

Created on 2012-11-08 20:07 by rhettinger, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue-16443.diff a.kasyanov, 2012-12-23 11:56 review
Messages (8)
msg175188 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012-11-08 20:07
The match objects currently do not have useful docstrings.  An easy task is to add docstrings modeled after the text in the regular docs.

  import re
  mo = re.search('abc', 'abc')
  help(mo)
msg175240 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-11-09 14:28
Do you mean http://docs.python.org/2/library/re.html#match-objects ?
This doesn't seem to say anything too useful.
msg177975 - (view) Author: Anton Kasyanov (a.kasyanov) * Date: 2012-12-23 11:56
Created a patch with docstrings for match objects. Also added empty lines in pattern object docstrings according to http://www.python.org/dev/peps/pep-0007/#id7
msg178001 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-23 18:01
New changeset e4f1b3565509 by Andrew Svetlov in branch '3.2':
Issue #16443: Add docstrings to regular expression match objects.
http://hg.python.org/cpython/rev/e4f1b3565509

New changeset 64e050c2d010 by Andrew Svetlov in branch '3.3':
Issue #16443: Add docstrings to regular expression match objects.
http://hg.python.org/cpython/rev/64e050c2d010

New changeset e3d0417d8266 by Andrew Svetlov in branch 'default':
Issue #16443: Add docstrings to regular expression match objects.
http://hg.python.org/cpython/rev/e3d0417d8266
msg178002 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-23 18:09
New changeset c390dc999fcc by Andrew Svetlov in branch '2.7':
Issue #16443: Add docstrings to regular expression match objects.
http://hg.python.org/cpython/rev/c390dc999fcc
msg178004 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-12-23 18:14
Pushed. Thank you, Anton!
msg178035 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-24 08:01
`MatchObject` term is not defined anywhere in the documentation. It will be better to use `match object` instead.
msg178152 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-12-25 16:53
Fixed in #16760
History
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60647
2013-01-26 15:19:45serhiy.storchakalinkissue12397 superseder
2012-12-25 16:53:28asvetlovsetmessages: + msg178152
2012-12-24 08:01:07serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg178035
2012-12-23 18:14:39asvetlovsetstatus: open -> closed
versions: + Python 2.7
messages: + msg178004

resolution: fixed
stage: needs patch -> resolved
2012-12-23 18:09:10python-devsetmessages: + msg178002
2012-12-23 18:01:11python-devsetnosy: + python-dev
messages: + msg178001
2012-12-23 11:56:43a.kasyanovsetfiles: + issue-16443.diff
versions: - Python 2.7
nosy: + asvetlov, a.kasyanov

messages: + msg177975

keywords: + patch
2012-11-09 14:28:11ezio.melottisetmessages: + msg175240
2012-11-08 21:56:57ezio.melottisetnosy: + ezio.melotti, mrabarnett
stage: needs patch

components: + Regular Expressions
versions: - Python 3.1
2012-11-08 20:07:12rhettingercreate