Issue #22033: Reprs of most Python implemened classes now contain actual

class name instead of hardcoded one.
This commit is contained in:
Serhiy Storchaka 2014-07-25 23:36:00 +03:00
parent 54701f303f
commit 465e60e654
24 changed files with 102 additions and 74 deletions

View file

@ -641,7 +641,7 @@ class Quoter(collections.defaultdict):
def __repr__(self):
# Without this, will just display as a defaultdict
return "<Quoter %r>" % dict(self)
return "<%s %r>" % (self.__class__.__name__, dict(self))
def __missing__(self, b):
# Handle a cache miss. Store quoted string in cache and return.