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

Cause pydoc to show data descriptor __doc__ strings #38235

Closed
glchapman mannequin opened this issue Mar 29, 2003 · 5 comments
Closed

Cause pydoc to show data descriptor __doc__ strings #38235

glchapman mannequin opened this issue Mar 29, 2003 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@glchapman
Copy link
Mannequin

glchapman mannequin commented Mar 29, 2003

BPO 711902
Nosy @loewis
Files
  • pydoc_patch.txt
  • pydoc_patch.txt
  • pydoc_patch2.txt
  • 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/loewis'
    closed_at = <Date 2003-05-03.09:09:29.000>
    created_at = <Date 2003-03-29.19:01:00.000>
    labels = ['library']
    title = 'Cause pydoc to show data descriptor __doc__ strings'
    updated_at = <Date 2003-05-03.09:09:29.000>
    user = 'https://bugs.python.org/glchapman'

    bugs.python.org fields:

    activity = <Date 2003-05-03.09:09:29.000>
    actor = 'loewis'
    assignee = 'loewis'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2003-03-29.19:01:00.000>
    creator = 'glchapman'
    dependencies = []
    files = ['5141', '5142', '5143']
    hgrepos = []
    issue_num = 711902
    keywords = ['patch']
    message_count = 5.0
    messages = ['43233', '43234', '43235', '43236', '43237']
    nosy_count = 2.0
    nosy_names = ['loewis', 'glchapman']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue711902'
    versions = ['Python 2.3']

    @glchapman
    Copy link
    Mannequin Author

    glchapman mannequin commented Mar 29, 2003

    Data descriptors (descriptors having both a __get__ and
    a __set__ method) often have __doc__ strings. Pydoc
    displays these for descriptors of type property, but not
    for other types (e.g., getsets). The attached patch will
    display __doc__ strings for data descriptors (if available)
    in the "Data and non-method functions" section of the
    type description.

    This patch is intended to be a minimal change. It's
    possible that inspect.classify_class_attrs should return
    a new kind for data descriptors (or possibly
    the "property" kind should include all data descriptors
    (not just properties)), which could then be handled
    differently from other non-classified data.

    @glchapman glchapman mannequin closed this as completed Mar 29, 2003
    @glchapman glchapman mannequin assigned loewis Mar 29, 2003
    @glchapman glchapman mannequin added the stdlib Python modules in the Lib dir label Mar 29, 2003
    @glchapman glchapman mannequin closed this as completed Mar 29, 2003
    @glchapman glchapman mannequin assigned loewis Mar 29, 2003
    @glchapman glchapman mannequin added the stdlib Python modules in the Lib dir label Mar 29, 2003
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 18, 2003

    Logged In: YES
    user_id=21627

    The patch looks fine. Can you please also provide a patch
    for the documentation (libinspect.tex), and the test suite
    (test_inspect.py)?

    @glchapman
    Copy link
    Mannequin Author

    glchapman mannequin commented Apr 21, 2003

    Logged In: YES
    user_id=86307

    Attaching new patch with docs and a couple of tests.

    @glchapman
    Copy link
    Mannequin Author

    glchapman mannequin commented Apr 21, 2003

    Logged In: YES
    user_id=86307

    Apparently, Sourceforge won't let me delete the old patch file
    (I get a permission denied error), so, to avoid confusion, here
    is the new patch in a file named pydoc_patch2.txt.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 3, 2003

    Logged In: YES
    user_id=21627

    Thanks for the patch. Applied as

    libinspect.tex 1.12
    inspect.py 1.43
    pydoc.py 1.82
    test_inspect.py 1.10
    NEWS 1.755

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants