[New-bugs-announce] [issue40383] some class name are hardcoded in reprs

OhBonsai report at bugs.python.org
Fri Apr 24 23:05:17 EDT 2020


New submission from OhBonsai <letbonsaibe at gmail.com>:

Same with #21861 #27541

hard-coding in https://github.com/python/cpython/blob/master/Objects/weakrefobject.c#L162  __repr__ 

----- Reproducing
>>> import weakref
>>> class ExtendRef(weakref.ref): pass
... 
>>> class Obj(): pass
... 
>>> eref = ExtendRef(Obj())
>>> eref
<weakref at 0x1046bc520; dead>

----- Expect the subclass name
>>> eref
<ExtendRef at 0x1046bc520; dead>

----------
components: Extension Modules
messages: 367248
nosy: OhBonsai, corona10, taleinat
priority: normal
severity: normal
status: open
title: some class name are hardcoded in reprs
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40383>
_______________________________________


More information about the New-bugs-announce mailing list