MCPcopy Create free account
hub / github.com/Infiziert90/getnative / get_attr

Function get_attr

getnative/utils.py:42–47  ·  view source on GitHub ↗
(obj, attr, default=None)

Source from the content-addressed store, hash-verified

40
41
42def get_attr(obj, attr, default=None):
43 for ele in attr.split('.'):
44 obj = getattr(obj, ele, default)
45 if obj == default:
46 return default
47 return obj
48
49
50def to_float(str_value):

Callers 3

__init__Method · 0.90
_getnativeFunction · 0.90
get_source_filterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected