diff options
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index ef2407c..9290b4b 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -2460,6 +2460,13 @@ class BoundArguments: def __getstate__(self): return {'_signature': self._signature, 'arguments': self.arguments} + def __repr__(self): + 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)) + class Signature: """A Signature object represents the overall signature of a function. |