MCPcopy Index your code
hub / github.com/STIXProject/python-stix / is_sequence

Function is_sequence

stix/utils/__init__.py:220–225  ·  view source on GitHub ↗

Returns ``True`` if `value` is a sequence type (e.g., ``list``, or ``tuple``). String types will return ``False``.

(item)

Source from the content-addressed store, hash-verified

218
219
220def is_sequence(item):
221 """Returns ``True`` if `value` is a sequence type (e.g., ``list``, or
222 ``tuple``). String types will return ``False``.
223
224 """
225 return hasattr(item, "__iter__") and not isinstance(item, string_types)
226
227
228def check_version(expected, found):

Callers 5

warnFunction · 0.85
check_versionFunction · 0.85
to_dictFunction · 0.85
iterwalkFunction · 0.85
iterpathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected