From 78d5f13bfca1eba72542100a17f6ef4c6ea18edf Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Fri, 8 Aug 2025 14:35:53 +0100 Subject: [PATCH 1/2] Replace "ordered arguments" with "non-keyword arguments" in unittest.mock documentation --- Doc/library/unittest.mock.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 091562cc9aef98..b331b42743c140 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -639,7 +639,7 @@ the *new_callable* argument to :func:`patch`. This is either ``None`` (if the mock hasn't been called), or the arguments that the mock was last called with. This will be in the form of a tuple: the first member, which can also be accessed through - the ``args`` property, is any ordered arguments the mock was + the ``args`` property, is any non-keyword arguments the mock was called with (or an empty tuple) and the second member, which can also be accessed through the ``kwargs`` property, is any keyword arguments (or an empty dictionary). From 260edb0bab496339995d80bbd8ff1ccd68109ba9 Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Fri, 8 Aug 2025 14:53:10 +0100 Subject: [PATCH 2/2] Update unittest.mock.rst --- Doc/library/unittest.mock.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index b331b42743c140..91f90a0726aa93 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -639,7 +639,7 @@ the *new_callable* argument to :func:`patch`. This is either ``None`` (if the mock hasn't been called), or the arguments that the mock was last called with. This will be in the form of a tuple: the first member, which can also be accessed through - the ``args`` property, is any non-keyword arguments the mock was + the ``args`` property, is any positional arguments the mock was called with (or an empty tuple) and the second member, which can also be accessed through the ``kwargs`` property, is any keyword arguments (or an empty dictionary).