8000 change repr to exclude duplicate name · python/cpython@f11c291 · GitHub
[go: up one dir, main page]

Skip to content

Commit f11c291

Browse files
committed
change repr to exclude duplicate name
1 parent 6c113fe commit f11c291

File tree

Collapse file tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/http/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ def __new__(cls, value, description):
166166
obj.description = description
167167
return obj
168168

169+
def __repr__(self):
170+
return "<%s.%s>" % (self.__class__.__name__, self._name_)
171+
169172
CONNECT = 'CONNECT', 'Establish a connection to the server.'
170173
DELETE = 'DELETE', 'Remove the target.'
171174
GET = 'GET', 'Retrieve the target.'

0 commit comments

Comments
 (0)
0