xoa.misc.dict_check_defaults

xoa.misc.dict_check_defaults(dd, **defaults)[source]

Check that a dictionary has some default values

Parameters:
  • dd (dict) – Dictionary to check

  • **defs (dict) – Dictionary of default values

Example

In [1]: dd = dict(color='blue')

In [2]: dict_check_defaults(dd, color='red', size=10)
Out[2]: {'color': 'blue', 'size': 10}