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

Subclass friendly reprs #66232

Closed
serhiy-storchaka opened this issue Jul 22, 2014 · 4 comments
Closed

Subclass friendly reprs #66232

serhiy-storchaka opened this issue Jul 22, 2014 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 22033
Nosy @rhettinger, @vstinner, @serhiy-storchaka
Files
  • repr_subclass_friendly.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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2014-07-25.20:40:49.651>
    created_at = <Date 2014-07-22.09:08:04.932>
    labels = ['type-feature', 'library']
    title = 'Subclass friendly reprs'
    updated_at = <Date 2014-07-25.20:40:49.650>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2014-07-25.20:40:49.650>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2014-07-25.20:40:49.651>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2014-07-22.09:08:04.932>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['36027']
    hgrepos = []
    issue_num = 22033
    keywords = ['patch']
    message_count = 4.0
    messages = ['223650', '223988', '223997', '223999']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'vstinner', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22033'
    versions = ['Python 3.5']

    @serhiy-storchaka
    Copy link
    Member Author

    Some reprs in stdlib are subclass friendly. They contains class name or even fully qualified class name and substitute appropriate subclass name in subclasses. But some reprs contains hardcoded either class name, or module name, or fully qualified class name. Proposed patch makes multiple reprs in stdlib more subclass friendly.

    See also bpo-22032.

    @serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jul 22, 2014
    @rhettinger
    Copy link
    Contributor

    +1 These all look worthwhile and correct.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 25, 2014

    New changeset 42276ad3acef by Serhiy Storchaka in branch 'default':
    Issue bpo-22033: Reprs of most Python implemened classes now contain actual
    http://hg.python.org/cpython/rev/42276ad3acef

    @serhiy-storchaka
    Copy link
    Member Author

    Thanks Raymond for the review.

    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 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants