MCPcopy Create free account
hub / github.com/STIXProject/python-stix / _iter_vars

Function _iter_vars

stix/utils/walk.py:28–37  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

26
27
28def _iter_vars(obj):
29 attrs = []
30
31 if hasattr(obj, "__dict__"):
32 attrs.append(iteritems(vars(obj)))
33
34 if hasattr(obj, "_fields"):
35 attrs.append(iteritems(obj._fields))
36
37 return itertools.chain.from_iterable(attrs)
38
39
40def iterwalk(obj):

Callers 2

iterwalkFunction · 0.85
iterpathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected