From 8229778aa24e63c5ce210e17c3379609504b2011 Mon Sep 17 00:00:00 2001 From: johnslavik Date: Mon, 29 Jun 2026 19:01:53 +0200 Subject: [PATCH 1/2] Improve `sys.lazy_modules` docs --- Doc/library/sys.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index d0fe0625deb513..bf067910701b11 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1484,10 +1484,10 @@ always available. Unless explicitly noted otherwise, all variables are read-only .. data:: lazy_modules - A :class:`set` of fully qualified module name strings that have been lazily - imported in the current interpreter but not yet loaded. When a - lazily imported module is accessed for the first time, its name is removed - from this set. + A :class:`set` of strings capturing lazily imported modules or module members + in the current interpreter. When a lazily imported module or module + member is accessed and its delayed import is successful, its name is + removed from this set. This attribute is intended for debugging and introspection. From 40c882697c3c6fa9c29eb61316e2180c9ebe760e Mon Sep 17 00:00:00 2001 From: johnslavik Date: Mon, 29 Jun 2026 19:03:55 +0200 Subject: [PATCH 2/2] It's "first" accessed --- Doc/library/sys.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index bf067910701b11..9ad91bbdc9313c 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1485,9 +1485,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only .. data:: lazy_modules A :class:`set` of strings capturing lazily imported modules or module members - in the current interpreter. When a lazily imported module or module - member is accessed and its delayed import is successful, its name is - removed from this set. + in the current interpreter. When a lazily imported module or module member + is first accessed and its delayed import is successful, its name is removed + from this set. This attribute is intended for debugging and introspection.