[issue22998] inspect.Signature and default arguments
Dec. 9, 2014
5:33 a.m.
Walter Dörwald added the comment: The updated code in the documentation still doesn't set the * and ** parameters. I would have preferred the following code: for param in sig.parameters.values(): if param.name not in ba.arguments: if param.kind is inspect.Parameter.VAR_POSITIONAL: default = () elif param.kind is inspect.Parameter.VAR_KEYWORD: default = {} else: default = param.default ba.arguments[param.name] = default ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue22998> _______________________________________
3695
Age (days ago)
3695
Last active (days ago)
0 comments
1 participants
participants (1)
-
Walter Dörwald