MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / decode

Function decode

example_code/item_036.py:85–89  ·  view source on GitHub ↗
(data, default={})

Source from the content-addressed store, hash-verified

83import json
84
85def decode(data, default={}):
86 try:
87 return json.loads(data)
88 except ValueError:
89 return default
90
91
92print("Example 5")

Callers 1

item_036.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected