mkt.schema.utils.rsetattr

mkt.schema.utils.rsetattr(obj, attr, val)[source]

Set attribute from object recursively.

Parameters:
  • obj (Any) – Object to get attribute from.

  • attr (str) – Attribute to get.

  • val (Any) – Value to set attribute to.

Returns:

Value of attribute if found, otherwise default value.

Return type:

Any