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

Fix the docstring of inspect.Parameter and the implementation of _ParameterKind #63772

Closed
anntzer mannequin opened this issue Nov 13, 2013 · 5 comments
Closed

Fix the docstring of inspect.Parameter and the implementation of _ParameterKind #63772

anntzer mannequin opened this issue Nov 13, 2013 · 5 comments
Assignees
Labels
docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@anntzer
Copy link
Mannequin

anntzer mannequin commented Nov 13, 2013

BPO 19573
Nosy @ncoghlan, @ezio-melotti, @ethanfurman, @1st1, @anntzer
Files
  • inspect.py.diff: patch for Lib/inspect.py
  • inspect.py.diff: patch for Lib/inspect.py
  • 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 = 'https://github.com/1st1'
    closed_at = <Date 2014-03-27.15:32:29.752>
    created_at = <Date 2013-11-13.19:33:43.007>
    labels = ['type-feature', 'library', 'docs']
    title = 'Fix the docstring of inspect.Parameter and the implementation of _ParameterKind'
    updated_at = <Date 2014-03-27.15:32:29.691>
    user = 'https://github.com/anntzer'

    bugs.python.org fields:

    activity = <Date 2014-03-27.15:32:29.691>
    actor = 'python-dev'
    assignee = 'yselivanov'
    closed = True
    closed_date = <Date 2014-03-27.15:32:29.752>
    closer = 'python-dev'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2013-11-13.19:33:43.007>
    creator = 'Antony.Lee'
    dependencies = []
    files = ['32600', '33913']
    hgrepos = []
    issue_num = 19573
    keywords = ['patch']
    message_count = 5.0
    messages = ['202773', '209591', '210255', '210256', '214956']
    nosy_count = 7.0
    nosy_names = ['ncoghlan', 'ezio.melotti', 'docs@python', 'ethan.furman', 'python-dev', 'yselivanov', 'Antony.Lee']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue19573'
    versions = ['Python 3.5']

    @anntzer
    Copy link
    Mannequin Author

    anntzer mannequin commented Nov 13, 2013

    The following patch corrects the docstring of inspect.Parameter, as the default and annotation attributes are in fact set to empty if no value is provided, and the kind attribute is in fact an int (more precisely, a _ParameterKind). It also reimplements the _ParameterKind type as an IntEnum, as the previous implementation (which predates stdlib enums) was more or less a hand-rolled IntEnum.

    @anntzer anntzer mannequin assigned docspython Nov 13, 2013
    @anntzer anntzer mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Nov 13, 2013
    @ezio-melotti ezio-melotti added the stdlib Python modules in the Lib dir label Nov 16, 2013
    @1st1
    Copy link
    Member

    1st1 commented Jan 28, 2014

    Antony, the docstrings are fixed. Could you please provide a patch just for the _ParameterKind-Enum refactoring? I'll incorporate it into 3.5 then.

    @1st1 1st1 assigned 1st1 and unassigned docspython Jan 28, 2014
    @anntzer
    Copy link
    Mannequin Author

    anntzer mannequin commented Feb 4, 2014

    Submitted new patch as suggested.

    @1st1
    Copy link
    Member

    1st1 commented Feb 4, 2014

    The patch looks good to me. I'll merge it in 3.5 later.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 27, 2014

    New changeset c2b94f891c88 by Yury Selivanov in branch 'default':
    inspect.signature: Use enum for parameter kind constants. Closes bpo-19573
    http://hg.python.org/cpython/rev/c2b94f891c88

    @python-dev python-dev mannequin closed this as completed Mar 27, 2014
    @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 stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants