This document is for Celery's development version, which can be significantly different from previous releases. Get old docs here: 2.5.
Utility functions.
| copyright: |
|
|---|---|
| license: | BSD, see LICENSE for more details. |
Return stacktrace of all active threads.
With a function, and a list of keyword arguments, returns arguments in the list which the function takes.
If the object has an argspec attribute that is used instead of using the inspect.getargspec() introspection.
| Parameters: |
|
|---|
Examples
>>> def foo(self, x, y, logfile=None, loglevel=None):
... return x * y
>>> fun_takes_kwargs(foo, ["logfile", "loglevel", "task_id"])
["logfile", "loglevel"]
>>> def foo(self, x, y, **kwargs):
>>> fun_takes_kwargs(foo, ["logfile", "loglevel", "task_id"])
["logfile", "loglevel", "task_id"]
In place left precedent dictionary merge.
Keeps values from L, if the value in R is None.
Reraise if an exception is currently being handled, or return otherwise.