cpython: 49fd1c8aeca5 (original) (raw)

Mercurial > cpython

changeset 81831:49fd1c8aeca5 3.3

Issue #17071: Signature.bind() now works when one of the keyword arguments is named ``self``. [#17071]

Antoine Pitrou solipsis@pitrou.net
date Tue, 29 Jan 2013 21:20:57 +0100
parents 678320c7f63d
children 4ff1dc8c0a3c f39b69494393
files Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS
diffstat 3 files changed, 17 insertions(+), 4 deletions(-)[+] [-] Lib/inspect.py 8 Lib/test/test_inspect.py 10 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -2028,19 +2028,19 @@ class Signature: return self._bound_arguments_cls(self, arguments)

def str(self): result = []

--- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -2241,6 +2241,16 @@ class TestSignatureBind(unittest.TestCas with self.assertRaisesRegex(TypeError, "parameter is positional only"): self.call(test, a_po=1, b_po=2)

+ class TestBoundArguments(unittest.TestCase): def test_signature_bound_arguments_unhashable(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -164,6 +164,9 @@ Core and Builtins Library ------- +- Issue #17071: Signature.bind() now works when one of the keyword arguments