From b50a9416199ba41c193a56682998659cd8e78d20 Mon Sep 17 00:00:00 2001 From: Faris Basha TM <72191505+farisbasha@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:33:51 +0530 Subject: [PATCH] gh-103484: Remove an outdated footnote in the `unittest.mock` examples (GH-162166) (cherry picked from commit f5ec90d79e108e588a942ea5bfe4f479b2ec382d) Co-authored-by: Faris Basha TM <72191505+farisbasha@users.noreply.github.com> Co-authored-by: Stan Ulbrych --- Doc/library/unittest.mock-examples.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Doc/library/unittest.mock-examples.rst b/Doc/library/unittest.mock-examples.rst index da57f05edcf78fa..7b736b5aecb6412 100644 --- a/Doc/library/unittest.mock-examples.rst +++ b/Doc/library/unittest.mock-examples.rst @@ -642,7 +642,7 @@ Mocking a generator method ~~~~~~~~~~~~~~~~~~~~~~~~~~ A Python generator is a function or method that uses the :keyword:`yield` statement -to return a series of values when iterated over [#]_. +to return a series of values when iterated over. A generator method / function is called to return the generator object. It is the generator object that is then iterated over. The protocol method for @@ -671,12 +671,6 @@ To configure the values returned from the iteration (implicit in the call to >>> list(mock_foo.iter()) [1, 2, 3] -.. [#] There are also generator expressions and more `advanced uses - `_ of generators, but we aren't - concerned about them here. A very good introduction to generators and how - powerful they are is: `Generator Tricks for Systems Programmers - `_. - Applying the same patch to every test method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~