This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Regression in repr() of class object
Type: Stage: resolved
Components: Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Tim.Graham, abarry, ethan.furman, gvanrossum, kushal.das, ned.deily, python-dev, rhettinger, serhiy.storchaka
Priority: release blocker Keywords:

Created on 2016-07-12 15:54 by gvanrossum, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg270251 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-07-12 15:54
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?
msg270259 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2016-07-12 17:58
This change was done in issue25548.
msg270361 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-07-14 04:13
New changeset 4f11e6b72e8f by Benjamin Peterson in branch 'default':
Backed out changeset af29d89083b3 (closes #25548) (closes #27498)
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71685
2021-08-18 05:20:52ned.deilysetpull_requests: - pull_request26016
2021-07-30 21:42:07python-devsetpull_requests: + pull_request26016
2016-07-14 04:13:42python-devsetstatus: open -> closed

nosy: + ned.deily, python-dev
messages: + msg270361

resolution: fixed
stage: resolved
2016-07-13 13:47:04abarrysetnosy: + abarry
2016-07-13 04:08:13serhiy.storchakasetnosy: + serhiy.storchaka
2016-07-12 23:38:25ned.deilysetpriority: normal -> release blocker
2016-07-12 20:38:15Tim.Grahamsetnosy: + Tim.Graham
2016-07-12 18:53:48brett.cannonsetnosy: + kushal.das
2016-07-12 17:58:28ethan.furmansetnosy: + ethan.furman
messages: + msg270259
2016-07-12 16:38:04r.david.murraysetnosy: + rhettinger
2016-07-12 15:54:02gvanrossumcreate