From 3f720e8d04b60e8fa68c9d8c29983885490b1089 Mon Sep 17 00:00:00 2001 From: Fie <40601523+Zkaij@users.noreply.github.com> Date: Wed, 4 Nov 2026 20:29:27 +0000 Subject: [PATCH] Fixed typos in `json` docstrings (GH-161261) (cherry picked from commit 43839687ac540404237feaa8dddb81e3c2187f01) Co-authored-by: Fie <40601523+Zkaij@users.noreply.github.com> --- Lib/json/__init__.py | 4 ++-- Lib/json/encoder.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/json/__init__.py b/Lib/json/__init__.py index 800cc37f6afe31d..c50a283f4e5cd86 100644 --- a/Lib/json/__init__.py +++ b/Lib/json/__init__.py @@ -134,7 +134,7 @@ def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, If ``check_circular`` is false, then the circular reference check for container types will be skipped and a circular reference will - result in an ``RecursionError`` (or worse). + result in a ``RecursionError`` (or worse). If ``allow_nan`` is false, then it will be a ``ValueError`` to serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) @@ -198,7 +198,7 @@ def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, If ``check_circular`` is false, then the circular reference check for container types will be skipped and a circular reference will - result in an ``RecursionError`` (or worse). + result in a ``RecursionError`` (or worse). If ``allow_nan`` is false, then it will be a ``ValueError`` to serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py index 5cf6d64f3eade60..1604ad7aa17c1ef 100644 --- a/Lib/json/encoder.py +++ b/Lib/json/encoder.py @@ -118,7 +118,7 @@ def __init__(self, *, skipkeys=False, ensure_ascii=True, If check_circular is true, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to - prevent an infinite recursion (which would cause an RecursionError). + prevent an infinite recursion (which would cause a RecursionError). Otherwise, no such check takes place. If allow_nan is true, then NaN, Infinity, and -Infinity will be