You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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=Noneclosed_at=<Date2016-07-14.04:13:42.855>created_at=<Date2016-07-12.15:54:02.015>labels= ['release-blocker']
title='Regression in repr() of class object'updated_at=<Date2021-08-18.05:20:52.357>user='https://github.com/gvanrossum'
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?
Activity
gvanrossum commentedon Jul 12, 2016
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?
ethanfurman commentedon Jul 12, 2016
This change was done in bpo-25548.
python-dev commentedon Jul 14, 2016
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