MCPcopy Index your code
hub / github.com/python/cpython / loads

Function loads

Lib/plistlib.py:908–918  ·  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

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

Callers

nothing calls this directly

Calls 3

BytesIOClass · 0.90
loadFunction · 0.70
encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…