@@ -36,9 +36,11 @@ This module defines the following functions:
36
36
37
37
.. function :: load(fp, /, *, parse_float=float)
38
38
39
- Read a TOML file. The first argument should be a readable and binary file object.
40
- Return a :class: `dict `. Convert TOML types to Python using this
41
- :ref: `conversion table <toml-to-py-table >`.
39
+ Deserialize TOML data from a file-like object, converting TOML types to
40
+ Python using this :ref: `conversion table <toml-to-py-table >`. The first
41
+ argument should be a readable binary file-like object. Returns a
42
+ :class: `dict `.
43
+
42
44
43
45
*parse_float * will be called with the string of every TOML
44
46
float to be decoded. By default, this is equivalent to ``float(num_str) ``.
@@ -51,9 +53,10 @@ This module defines the following functions:
51
53
52
54
.. function :: loads(s, /, *, parse_float=float)
53
55
54
- Load TOML from a :class: `str ` object. Return a :class: `dict `. Convert TOML
55
- types to Python using this :ref: `conversion table <toml-to-py-table >`. The
56
- *parse_float * argument has the same meaning as in :func: `load `.
56
+ Deserialize TOML data from a :class: `str ` object, converting TOML types to
57
+ Python using this :ref: `conversion table <toml-to-py-table >`. Returns a
58
+ :class: `dict `. The *parse_float * argument has the same meaning as in
59
+ :func: `load `.
57
60
58
61
A :exc: `TOMLDecodeError ` will be raised on an invalid TOML document.
59
62
0 commit comments