summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-01-29 20:21:56 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-01-29 20:21:56 (GMT)
commit64a5562f4c92b6b99762f71d3506b4b0644cec70 (patch)
treec8fb769f9287f2f32ef8d35650aecfae0b0f4992 /Lib/inspect.py
parentf7209225bbc386aa3dd49e5c2c601cd0906ccb53 (diff)
parentbd41d1b14c03e76c6ebf396720eddba60f00c8dc (diff)
downloadcpython-64a5562f4c92b6b99762f71d3506b4b0644cec70.zip
cpython-64a5562f4c92b6b99762f71d3506b4b0644cec70.tar.gz
cpython-64a5562f4c92b6b99762f71d3506b4b0644cec70.tar.bz2
Issue #17071: Signature.bind() now works when one of the keyword arguments is named self.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index c389f6a..3661316 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -2028,19 +2028,19 @@ class Signature:
return self._bound_arguments_cls(self, arguments)
- def bind(self, *args, **kwargs):
+ def bind(__bind_self, *args, **kwargs):
'''Get a BoundArguments object, that maps the passed `args`
and `kwargs` to the function's signature. Raises `TypeError`
if the passed arguments can not be bound.
'''
- return self._bind(args, kwargs)
+ return __bind_self._bind(args, kwargs)
- def bind_partial(self, *args, **kwargs):
+ def bind_partial(__bind_self, *args, **kwargs):
'''Get a BoundArguments object, that partially maps the
passed `args` and `kwargs` to the function's signature.
Raises `TypeError` if the passed arguments can not be bound.
'''
- return self._bind(args, kwargs, partial=True)
+ return __bind_self._bind(args, kwargs, partial=True)
def __str__(self):
result = []