Description
Documentation
In (A) Future Object add_done_callback(callback, *, context=None) it says The callback is called with the Future object as its only argument. It also says functools.partial() can be used to pass parameters to the callback.
However, (B) functools.partial(func, /, *args, **keywords) says If more [non-keyword] arguments are supplied to the call, they are appended to args.
When I call add_done_callback(functools.partial(done_callback, *args, **kwargs)), what appears to be happening is what is described by (B) rather than (A). In other words:
functools.partial() can be used to pass additional parameters to the callback. The callback is called with the Future object as the last (possibly only) non-keyword argument (rather than its first/"only" argument).
Metadata
Metadata
Assignees
Projects
Status

