MCPcopy
hub / github.com/fluentpython/example-code-2e / makelist

Function makelist

21-async/mojifinder/bottle.py:153–156  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

151 warnings.warn(message, DeprecationWarning, stacklevel=3)
152
153def makelist(data): # This is just to handy
154 if isinstance(data, (tuple, list, set, dict)): return list(data)
155 elif data: return [data]
156 else: return []
157
158
159class DictProperty(object):

Callers 3

routeMethod · 0.85
decoratorMethod · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected