diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-15 16:53:56 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-15 16:53:56 (GMT) |
commit | f229bc5c53e3dd2c1d2914c10efff08af88ca277 (patch) | |
tree | 7a6ab9841690c3d7ede25d4591c304d163f615d0 /Lib/inspect.py | |
parent | 51b58325f97c298c88e95c95bb2291eaf47e78e2 (diff) | |
download | cpython-f229bc5c53e3dd2c1d2914c10efff08af88ca277.zip cpython-f229bc5c53e3dd2c1d2914c10efff08af88ca277.tar.gz cpython-f229bc5c53e3dd2c1d2914c10efff08af88ca277.tar.bz2 |
inspect: Remove "0x..." IDs from Signature objects' __repr__
Issue 24200.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 9290b4b..9389f3b 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -2346,8 +2346,7 @@ class Parameter: return formatted def __repr__(self): - return '<{} at {:#x} "{}">'.format(self.__class__.__name__, - id(self), self) + return '<{} "{}">'.format(self.__class__.__name__, self) def __hash__(self): return hash((self.name, self.kind, self.annotation, self.default)) @@ -2464,8 +2463,7 @@ class BoundArguments: args = [] for arg, value in self.arguments.items(): args.append('{}={!r}'.format(arg, value)) - return '<{} at {:#x} ({})>'.format(self.__class__.__name__, - id(self), ', '.join(args)) + return '<{} ({})>'.format(self.__class__.__name__, ', '.join(args)) class Signature: @@ -2835,8 +2833,7 @@ class Signature: self._return_annotation = state['_return_annotation'] def __repr__(self): - return '<{} at {:#x} "{}">'.format(self.__class__.__name__, - id(self), self) + return '<{} {}>'.format(self.__class__.__name__, self) def __str__(self): result = [] |