Visitar URL original
bpo-40059: tomllib by hukkin · Pull Request #31498 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document parse_float limitations
  • Loading branch information
hukkin committed Feb 2, 2022
commit eafc4e07ec58a886ba76e68564ca7c3606a97b47
4 changes: 3 additions & 1 deletion Doc/library/tomllib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ This module defines the following functions:
*parse_float* will be called with the string of every TOML
float to be decoded. By default, this is equivalent to ``float(num_str)``.
This can be used to use another datatype or parser for TOML floats
(e.g. :class:`decimal.Decimal`).
(e.g. :class:`decimal.Decimal`). The callable must not return a
:class:`dict`, a :class:`list`, or anything that has the ``append``
attribute. These illegal types produce undefined behavior.

A :exc:`TOMLDecodeError` will be raised on an invalid TOML document.

Expand Down