Message376756
Not sure I agree with it being just a doc issue -- happy to clarify if something was unclear, not sure from your message if it was or if you disagree, but e.g.:
> However, your 'two' function takes no arguments, so valid values of args and kwargs must be empty for them to be used in a call. In all cases, args() and kwargs() must look at the signature to see which key-value pairs they should extract from arguments.
Right, and that's "dangerous" behavior to me -- BoundArguments.arguments will happily let you add arguments to it, but does no error checking at that point, so does not raise an exception if you typo an argument that isn't in the signature of the callable, and then when you try to call the callable (via the only way possible, namely using .args and .kwargs), that argument that was never added is just dropped.
Does that make sense? Or were you disagreeing with that being undesirable behavior? |
|
Date |
User |
Action |
Args |
2020-09-12 00:42:28 | Julian | set | recipients:
+ Julian, terry.reedy, docs@python, yselivanov |
2020-09-12 00:42:28 | Julian | set | messageid: <1599871348.82.0.535815523457.issue41745@roundup.psfhosted.org> |
2020-09-12 00:42:28 | Julian | link | issue41745 messages |
2020-09-12 00:42:28 | Julian | create | |
|