[issue27498] Regression in repr() of class object

Guido van Rossum report at bugs.python.org
Tue Jul 12 11:54:02 EDT 2016


New submission from Guido van Rossum:

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?

----------
messages: 270251
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: Regression in repr() of class object
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27498>
_______________________________________


More information about the Python-bugs-list mailing list