From: Andrés Delfino Date: Fri, 15 Jun 2018 19:23:37 +0000 (-0300) Subject: [2.7] bpo-33852: Remove misplaced parentheses around 'list'. (GH-7672) (#7716) X-Git-Tag: v2.7.16rc1~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=184e8ed1eeda3ba869755ff37374dd86f332f30d;p=thirdparty%2FPython%2Fcpython.git [2.7] bpo-33852: Remove misplaced parentheses around 'list'. (GH-7672) (#7716) 'expresson list' refers to the grammar term 'expression_list' in the subscription production.. (cherry picked from commit 4fddd4e4069aad9efad999d8d9ce3cd9fb523a5c) Co-authored-by: Andrés Delfino --- diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 7fbfae747f6f..6afc8673420b 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -581,7 +581,7 @@ whose value is one of the keys of the mapping, and the subscription selects the value in the mapping that corresponds to that key. (The expression list is a tuple except if it has exactly one item.) -If the primary is a sequence, the expression (list) must evaluate to a plain +If the primary is a sequence, the expression list must evaluate to a plain integer. If this value is negative, the length of the sequence is added to it (so that, e.g., ``x[-1]`` selects the last item of ``x``.) The resulting value must be a nonnegative integer less than the number of items in the sequence, and