[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts
Yury Selivanov
report at bugs.python.org
Fri Jun 20 20:21:51 CEST 2014
Yury Selivanov added the comment:
That's the intended and documented behaviour, see https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.arguments.
You can easily implement the functionality you need by iterating through Signature.parameters and copying defaults to the BoundArguments.arguments mapping. There is no need to complicate the API with a dedicated method for that (if anything, in 3.5 you can subclass Signature and use from_callable to have any functionality you want).
Closing this one as 'not a bug'.
----------
resolution: -> not a bug
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21684>
_______________________________________
More information about the Python-bugs-list
mailing list