Skip to content
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

Add docstrings to regular expression match objects #60647

Closed
rhettinger opened this issue Nov 8, 2012 · 8 comments
Closed

Add docstrings to regular expression match objects #60647

rhettinger opened this issue Nov 8, 2012 · 8 comments
Labels
docs Documentation in the Doc dir easy topic-regex type-feature A feature request or enhancement

Comments

@rhettinger
Copy link
Contributor

BPO 16443
Nosy @rhettinger, @ezio-melotti, @asvetlov, @serhiy-storchaka
Files
  • issue-16443.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-12-23.18:14:39.981>
    created_at = <Date 2012-11-08.20:07:12.595>
    labels = ['expert-regex', 'easy', 'type-feature', 'docs']
    title = 'Add docstrings to regular expression match objects'
    updated_at = <Date 2012-12-25.16:53:28.051>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2012-12-25.16:53:28.051>
    actor = 'asvetlov'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2012-12-23.18:14:39.981>
    closer = 'asvetlov'
    components = ['Documentation', 'Regular Expressions']
    creation = <Date 2012-11-08.20:07:12.595>
    creator = 'rhettinger'
    dependencies = []
    files = ['28403']
    hgrepos = []
    issue_num = 16443
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['175188', '175240', '177975', '178001', '178002', '178004', '178035', '178152']
    nosy_count = 8.0
    nosy_names = ['rhettinger', 'ezio.melotti', 'mrabarnett', 'asvetlov', 'docs@python', 'python-dev', 'serhiy.storchaka', 'a.kasyanov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16443'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    @rhettinger
    Copy link
    Contributor Author

    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)

    @rhettinger rhettinger added docs Documentation in the Doc dir easy type-feature A feature request or enhancement labels Nov 8, 2012
    @ezio-melotti
    Copy link
    Member

    Do you mean http://docs.python.org/2/library/re.html#match-objects ?
    This doesn't seem to say anything too useful.

    @akasyanov
    Copy link
    Mannequin

    akasyanov mannequin commented Dec 23, 2012

    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

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 23, 2012

    New changeset e4f1b3565509 by Andrew Svetlov in branch '3.2':
    Issue bpo-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 bpo-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 bpo-16443: Add docstrings to regular expression match objects.
    http://hg.python.org/cpython/rev/e3d0417d8266

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 23, 2012

    New changeset c390dc999fcc by Andrew Svetlov in branch '2.7':
    Issue bpo-16443: Add docstrings to regular expression match objects.
    http://hg.python.org/cpython/rev/c390dc999fcc

    @asvetlov
    Copy link
    Contributor

    Pushed. Thank you, Anton!

    @serhiy-storchaka
    Copy link
    Member

    MatchObject term is not defined anywhere in the documentation. It will be better to use match object instead.

    @asvetlov
    Copy link
    Contributor

    Fixed in bpo-16760

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir easy topic-regex type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants