'Add default configuration from dict ``d``.
If the argument is a callable function then it will be regarded
as a promise, and it won\'t be loaded until the configuration is
actually needed.
This method can be compared to:
.. code-block:: pycon
>>> celery.conf.update(d)
with a difference that 1) no copy will be made and 2) the dict will
not be transferred when the worker spawns child processes, so
it\'s important that the same configuration happens at import time
when pickle restores the object on the other side.'

def add_defaults(self, fun):

    if (not callable(fun)):
        (d, fun) = (fun, (lambda : d))
    if self.configured:
        return self._conf.add_defaults(fun())
    self._pending_defaults.append(fun)
