cpython: a444464a2e87 (original) (raw)

Mercurial > cpython

changeset 96059:a444464a2e87

Issue 22547: Implement informative __repr__ for inspect.BoundArguments

Yury Selivanov yselivanov@sprymix.com
date Thu, 14 May 2015 18:47:17 -0400
parents 1cdcce187c43
children 77ebd3720284
files Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS
diffstat 3 files changed, 17 insertions(+), 0 deletions(-)[+] [-] Lib/inspect.py 7 Lib/test/test_inspect.py 7 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -2460,6 +2460,13 @@ class BoundArguments: def getstate(self): return {'_signature': self._signature, 'arguments': self.arguments}

+ class Signature: """A Signature object represents the overall signature of a function.

--- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -3149,6 +3149,13 @@ class TestBoundArguments(unittest.TestCa ba_pickled = pickle.loads(pickle.dumps(ba, ver)) self.assertEqual(ba, ba_pickled)

+ class TestSignaturePrivateHelpers(unittest.TestCase): def test_signature_get_bound_param(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -125,6 +125,9 @@ Library