[issue31194] Inconsistent __repr__s for _collections objects

Dan Snider report at bugs.python.org
Sun Aug 13 12:12:55 EDT 2017


New submission from Dan Snider:

With the new C implementation of collections.OrderedDict, its repr correctly uses the subclass's name, unlike deque and defaultdict.

class Thing(_collections.OrderedDict):
    pass
>>> Thing()
Thing([])

class Thing(_collections.deque):
    pass
>>> Thing()
deque([])

----------
components: Library (Lib)
messages: 300222
nosy: bup
priority: normal
severity: normal
status: open
title: Inconsistent __repr__s for _collections objects
type: enhancement
versions: Python 3.6

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


More information about the Python-bugs-list mailing list