[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you want to pursue, you might try python-list to find other users. I am not sure if this change really qualifies for python-ideas. -- ___ Python tracker ___

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-12 Thread Julian Berman
Julian Berman added the comment: Totally fair! Sorry, was just making sure the label change wasn't intended to say it *wasn't* enough to warrant a design change :) (which I agree should be discussed with folks who do use that functionality, of which I only recently had to). --

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I use signature for IDLE call tips, but have never used .bind and subsequent calls. After understanding the behavior, my question as initial reviewer is whether it is an *implementation* bug. Perhaps, but not obviously so. Whether or not it is a design war

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-11 Thread Julian Berman
Julian Berman added the comment: 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 e

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Bound is created with 5 public attributes: >>> dir(bound) [..., 'apply_defaults', 'args', 'arguments', 'kwargs', 'signature'] >>> bound.args () >>> bound.arguments {} >>> bound.kwargs {} msg376578: I don't understand 'non-existent' arguments, Nor 'what happen

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
Julian Berman added the comment: As a secondary behavior here, which is actually the one that matters more for my use case, the following seems surprising as well: import inspect s = inspect.signature(lambda **kwargs: kwargs).bind() s.arguments["foo"] = 12 will similarly silently drop "foo"

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
Change by Julian Berman : -- nosy: +yselivanov versions: -Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman
New submission from Julian Berman : The following code succeeds "silently", which seems undesirable: from inspect import signature def two(): return 2 bound = signature(two).bind() bound.arguments["does_not_exist"] = 12 two(*bound.args, **bound.kwargs) where the mec