Title: Docs for
Type: Stage:
Components: Documentation Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, guettli, xtreak
Priority: normal Keywords:

Created on 2021-07-20 14:38 by guettli, last changed 2021-07-20 16:10 by xtreak.

Messages (2)
msg397874 - (view) Author: Thomas Guettler (guettli) * Date: 2021-07-20 14:38
The docs for `` could get improved:

Up to now it is not clear how to access individual members of the call.

Example: I want to check if the call used the kwarg "foo" with the value of "bar".

Usually you don't need this, since you check for the whole call (all args and all kwargs).

But sometimes you jus twant to check for a single arg/kwarg.

Then it would be nice to have more detailed docs for the class "call".

BTW: Why has this class a lower-case name? Looks a bit strange.
msg397887 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2021-07-20 16:10
> A call object is either a tuple of (positional args, keyword args) or (name, positional args, keyword args) depending on how it was constructed added support for args and kwargs from python 3.9. So I guess you want to do call_object.kwargs["foo"] == "bar"
Date User Action Args
2021-07-20 16:10:03xtreaksetnosy: + xtreak
messages: + msg397887
2021-07-20 14:38:46guettlicreate