From 1ba4c9a2a7e78707de06d376bc971c7a99cb9edd Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Fri, 22 Apr 2022 00:35:30 -0700 Subject: [PATCH 1/2] Change wording from nested to inner --- Doc/tutorial/datastructures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 927a6722ca2514..417bee351d767e 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -303,7 +303,7 @@ The following list comprehension will transpose rows and columns:: >>> [[row[i] for row in matrix] for i in range(4)] [[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]] -As we saw in the previous section, the nested listcomp is evaluated in +As we saw in the previous section, the inner listcomp is evaluated in the context of the :keyword:`for` that follows it, so this example is equivalent to:: From d7f3dd7b380761def007ed4bc9cfd63b1b85b7f5 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 30 Apr 2022 16:56:48 -0500 Subject: [PATCH 2/2] Update Doc/tutorial/datastructures.rst Co-authored-by: Pieter Eendebak --- Doc/tutorial/datastructures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 417bee351d767e..f847ee325e0d79 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -303,7 +303,7 @@ The following list comprehension will transpose rows and columns:: >>> [[row[i] for row in matrix] for i in range(4)] [[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]] -As we saw in the previous section, the inner listcomp is evaluated in +As we saw in the previous section, the inner list comprehension is evaluated in the context of the :keyword:`for` that follows it, so this example is equivalent to::