Skip to content

Regression in repr() of class object #71685

Closed

Description

@gvanrossum
BPO 27498
Nosy @gvanrossum, @rhettinger, @ned-deily, @ethanfurman, @serhiy-storchaka, @kushaldas, @timgraham, @Vgr255

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 2016-07-14.04:13:42.855>
created_at = <Date 2016-07-12.15:54:02.015>
labels = ['release-blocker']
title = 'Regression in repr() of class object'
updated_at = <Date 2021-08-18.05:20:52.357>
user = 'https://github.com/gvanrossum'

bugs.python.org fields:

activity = <Date 2021-08-18.05:20:52.357>
actor = 'ned.deily'
assignee = 'none'
closed = True
closed_date = <Date 2016-07-14.04:13:42.855>
closer = 'python-dev'
components = []
creation = <Date 2016-07-12.15:54:02.015>
creator = 'gvanrossum'
dependencies = []
files = []
hgrepos = []
issue_num = 27498
keywords = []
message_count = 3.0
messages = ['270251', '270259', '270361']
nosy_count = 9.0
nosy_names = ['gvanrossum', 'rhettinger', 'ned.deily', 'ethan.furman', 'python-dev', 'serhiy.storchaka', 'kushal.das', 'Tim.Graham', 'abarry']
pr_nums = []
priority = 'release blocker'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue27498'
versions = ['Python 3.6']

Activity

  1. gvanrossum commented on Jul 12, 2016

    @gvanrossum
    MemberAuthor

    In Python 3.6, the repr() of a class includes its memory address.

    This is going to cause a lot of problems for tests in 3rd party code that expects the nice and clean <class '__main__.C'> instead of <class '__main__.C' at 0x7feb0360f568>.

    I understand the desire to provide more clarity in case somehow two class objects created at different times have the same name -- but I'm not sure I like to rub the hex address in the user's face all the time.

    Can we please roll this back or think about a better way to reveal this that won't break so many 3rd party tests?

  2. ethanfurman commented on Jul 12, 2016

    @ethanfurman
    Member

    This change was done in bpo-25548.

  3. python-dev commented on Jul 14, 2016

    python-devmannequin
    Mannequin

    New changeset 4f11e6b72e8f by Benjamin Peterson in branch 'default':
    Backed out changeset af29d89083b3 (closes bpo-25548) (closes bpo-27498)
    https://hg.python.org/cpython/rev/4f11e6b72e8f

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions