summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index acb8071..05d67fc 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -2192,8 +2192,8 @@ class Parameter:
return formatted
def __repr__(self):
- return '<{} at {:#x} {!r}>'.format(self.__class__.__name__,
- id(self), self.name)
+ return '<{} at {:#x} "{}">'.format(self.__class__.__name__,
+ id(self), self)
def __eq__(self, other):
# NB: We deliberately do not compare '_partial_kwarg' attributes
@@ -2698,6 +2698,10 @@ class Signature:
def __setstate__(self, state):
self._return_annotation = state['_return_annotation']
+ def __repr__(self):
+ return '<{} at {:#x} "{}">'.format(self.__class__.__name__,
+ id(self), self)
+
def __str__(self):
result = []
render_pos_only_separator = False