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 __module__ entry for function type in inspect docs table. #83099

Closed
ericsnowcurrently opened this issue Nov 26, 2019 · 6 comments
Closed
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement

Comments

@ericsnowcurrently
Copy link
Member

BPO 38918
Nosy @ericsnowcurrently, @miss-islington, @parthsharma2
PRs
  • bpo-38918: Add __module__ entry for function & method type in inspect docs table #17408
  • [3.7] bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408) #17675
  • [3.8] bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408) #17676
  • 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 2019-12-20.19:29:09.491>
    created_at = <Date 2019-11-26.15:27:12.431>
    labels = ['easy', '3.7', '3.8', '3.9', 'type-feature', 'docs']
    title = 'Add __module__ entry for function type in inspect docs table.'
    updated_at = <Date 2019-12-20.19:29:09.490>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2019-12-20.19:29:09.490>
    actor = 'eric.snow'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-12-20.19:29:09.491>
    closer = 'eric.snow'
    components = ['Documentation']
    creation = <Date 2019-11-26.15:27:12.431>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38918
    keywords = ['patch', 'easy', 'newcomer friendly']
    message_count = 6.0
    messages = ['357502', '357752', '358730', '358732', '358733', '358734']
    nosy_count = 4.0
    nosy_names = ['docs@python', 'eric.snow', 'miss-islington', 'parthsharma2']
    pr_nums = ['17408', '17675', '17676']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue38918'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @ericsnowcurrently
    Copy link
    Member Author

    The docs page for the inspect module has a large table describing the special attributes of various important types. One entry for function attributes is missing: __module__. It should be added.

    Note that __module__ *is* included in the function attributes listed in the language reference. [2]

    The same goes for the "method" (really "instance method") section of the table: it should also have __module__. [3]

    [1] https://docs.python.org/3/library/inspect.html#types-and-members
    [2] https://docs.python.org/3/reference/datamodel.html#index-34
    [3] https://docs.python.org/3/reference/datamodel.html#index-36

    @ericsnowcurrently ericsnowcurrently added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Nov 26, 2019
    @ericsnowcurrently ericsnowcurrently added docs Documentation in the Doc dir easy type-feature A feature request or enhancement labels Nov 26, 2019
    @parthsharma2
    Copy link
    Mannequin

    parthsharma2 mannequin commented Dec 3, 2019

    Hey Eric,

    I made a PR [1] which adds an entry for __module__ in the "function" and "method" sections of the table [2]. Can you review it and let me know if any changes are required?

    [1] #17408
    [2] https://docs.python.org/3/library/inspect.html#types-and-members

    @miss-islington
    Copy link
    Contributor

    New changeset f522a6d by Miss Islington (bot) (Parth Sharma) in branch 'master':
    bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
    f522a6d

    @miss-islington
    Copy link
    Contributor

    New changeset 0ffc900 by Miss Islington (bot) in branch '3.7':
    bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
    0ffc900

    @miss-islington
    Copy link
    Contributor

    New changeset 44683bb by Miss Islington (bot) in branch '3.8':
    bpo-38918: Add __module__ entry for function & method type in inspect docs table (GH-17408)
    44683bb

    @ericsnowcurrently
    Copy link
    Member Author

    Thanks for working on this, @parthsharma2!

    @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
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants