mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
This commit is contained in:
parent
54701f303f
commit
465e60e654
24 changed files with 102 additions and 74 deletions
|
@ -222,7 +222,7 @@ class UUID(object):
|
|||
return self.int
|
||||
|
||||
def __repr__(self):
|
||||
return 'UUID(%r)' % str(self)
|
||||
return '%s(%r)' % (self.__class__.__name__, str(self))
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
raise TypeError('UUID objects are immutable')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue