@@ -1044,11 +1044,11 @@ colon::
10441044 >>> number_names[1:3]
10451045 ['one', 'two']
10461046 >>> number_names[1:]
1047- ['one', two', 'three', 'four', 'five']
1047+ ['one', ' two', 'three', 'four', 'five']
10481048 >>> number_names[:3]
10491049 ['zero', 'one', 'two']
10501050 >>> number_names[:]
1051- ['zero', 'one', 'two']
1051+ ['zero', 'one', 'two', 'three', 'four', 'five' ]
10521052 >>> number_names[::2]
10531053 ['zero', 'two', 'four']
10541054
@@ -1101,13 +1101,13 @@ In this case, the interpreter unpacks the result into a tuple, and passes
11011101this tuple to :meth: `~object.__getitem__ ` or :meth: `~object.__class_getitem__ `::
11021102
11031103 >>> demo[*range(10)]
1104- subscripted with (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
1104+ subscripted with: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
11051105
11061106Starred expressions may be combined with comma-separated expressions
1107- and slices:::
1107+ and slices::
11081108
11091109 >>> demo['a', 'b', *range(3), 'c']
1110- subscripted with: ('a', 'b', 0, 1, 2, 'c')
1110+ subscripted with: ('a', 'b', 0, 1, 2, 'c')
11111111
11121112
11131113Formal subscription grammar
@@ -1123,7 +1123,7 @@ Formal subscription grammar
11231123 proper_slice: [`expression `] ":" [`expression `] [ ":" [`expression `] ]
11241124
11251125There is a semantic difference between the alternatives for *subscript *.
1126- If *subscript * contains ony one unstarred *slice * without a trailing comma,
1126+ If *subscript * contains only one unstarred *slice * without a trailing comma,
11271127it will evaluate to the value of that *slice *.
11281128Otherwise, *subscript * will evaluate to a :class: `tuple ` containing
11291129the items of *tuple_slices *.
0 commit comments