MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / to_iterable

Function to_iterable

dm_control/viewer/util.py:42–49  ·  view source on GitHub ↗

Converts an item or iterable into an iterable.

(item)

Source from the content-addressed store, hash-verified

40
41
42def to_iterable(item):
43 """Converts an item or iterable into an iterable."""
44 if isinstance(item, str):
45 return [item]
46 elif isinstance(item, collections.abc.Iterable):
47 return item
48 else:
49 return [item]
50
51
52class QuietSet:

Callers 3

__iadd__Method · 0.85
__isub__Method · 0.85
__iadd__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…