From f869e9cfb7def9a296caff8decf0ba8df39bda1d Mon Sep 17 00:00:00 2001 From: johnslavik Date: Mon, 16 Feb 2026 00:46:08 +0100 Subject: [PATCH 1/2] Clarify lazy import filters have positional-only arguments --- Doc/library/sys.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 4c76feafc9b492..b5e91fffa416e2 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1783,7 +1783,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only signature:: def filter(importing_module: str, imported_module: str, - fromlist: tuple[str, ...] | None) -> bool + fromlist: tuple[str, ...] | None, /) -> bool Where: @@ -1792,6 +1792,8 @@ always available. Unless explicitly noted otherwise, all variables are read-only * *fromlist* is the tuple of names being imported (for ``from ... import`` statements), or ``None`` for regular imports + and all of them are positional arguments. + The filter should return ``True`` to allow the import to be lazy, or ``False`` to force an eager import. From 4eebd62309f0279760f30a3480fce4bcd2fbfe3e Mon Sep 17 00:00:00 2001 From: johnslavik Date: Mon, 16 Feb 2026 01:06:27 +0100 Subject: [PATCH 2/2] Don't describe arguments as positional in written sentences --- Doc/library/sys.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index b5e91fffa416e2..de82e30ef62e99 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1792,8 +1792,6 @@ always available. Unless explicitly noted otherwise, all variables are read-only * *fromlist* is the tuple of names being imported (for ``from ... import`` statements), or ``None`` for regular imports - and all of them are positional arguments. - The filter should return ``True`` to allow the import to be lazy, or ``False`` to force an eager import.