From 63dd6387b61acdb8bb608ac3d6ead0c5803a4bea Mon Sep 17 00:00:00 2001 From: Taeknology <20297177+Taeknology@users.noreply.github.com> Date: Tue, 19 May 2026 14:53:27 +0900 Subject: [PATCH] gh-149050: Fix return type of ConfigParser.items() in documentation When called without a section argument, ConfigParser.items() delegates to dict.items() and returns a collections.abc.ItemsView, not a list. The docs previously described both overloads as returning a list. --- Doc/library/configparser.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index 4d720176fcc334..3a1bd2a3b9e8b4 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -1214,7 +1214,8 @@ ConfigParser Objects .. method:: items(raw=False, vars=None) items(section, raw=False, vars=None) - When *section* is not given, return a list of *section_name*, + When *section* is not given, return a + :class:`~collections.abc.ItemsView` of *section_name*, *section_proxy* pairs, including DEFAULTSECT. Otherwise, return a list of *name*, *value* pairs for the options in the