MCPcopy Index your code
hub / github.com/RustPython/RustPython / loads

Function loads

Lib/plistlib.py:915–925  ·  view source on GitHub ↗

Read a .plist file from a bytes object. Return the unpacked root object (which usually is a dictionary).

(value, *, fmt=None, dict_type=dict, aware_datetime=False)

Source from the content-addressed store, hash-verified

913
914
915def loads(value, *, fmt=None, dict_type=dict, aware_datetime=False):
916 """Read a .plist file from a bytes object.
917 Return the unpacked root object (which usually is a dictionary).
918 """
919 if isinstance(value, str):
920 if fmt == FMT_BINARY:
921 raise TypeError("value must be bytes-like object when fmt is "
922 "FMT_BINARY")
923 value = value.encode()
924 fp = BytesIO(value)
925 return load(fp, fmt=fmt, dict_type=dict_type, aware_datetime=aware_datetime)
926
927
928def dump(value, fp, *, fmt=FMT_XML, sort_keys=True, skipkeys=False,

Callers 1

stdlib_array.pyFile · 0.50

Calls 4

BytesIOClass · 0.90
isinstanceFunction · 0.85
loadFunction · 0.70
encodeMethod · 0.45

Tested by

no test coverage detected