scglue.utils.get_chained_attr

scglue.utils.get_chained_attr(x, attr)[源代码]

Get attribute from an object, with support for chained attribute names.

参数:
  • x (typing.Any) – Object to get attribute from

  • attr (str) – Attribute name

返回类型:

typing.Any

返回:

attr_value – Attribute value