Skip to content

Commit 7b3e41d

Browse files
committed
Add a 'continuing' comment to examples that use SubscriptionDemo
1 parent a9c6d8d commit 7b3e41d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/reference/expressions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ Any missing expression evaluates to :const:`None`.
10651065
This :class:`!slice` object is then passed to the :meth:`~object.__getitem__`
10661066
or :meth:`~object.__class_getitem__` method, as above. ::
10671067

1068+
# continuing with the SubscriptionDemo instance defined above:
10681069
>>> demo[2:3]
10691070
subscripted with: slice(2, 3, None)
10701071
>>> demo[::'spam']
@@ -1106,6 +1107,7 @@ The subscript can also contain a starred expression.
11061107
In this case, the interpreter unpacks the result into a tuple, and passes
11071108
this tuple to :meth:`~object.__getitem__` or :meth:`~object.__class_getitem__`::
11081109

1110+
# continuing with the SubscriptionDemo instance defined above:
11091111
>>> demo[*range(10)]
11101112
subscripted with: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
11111113

0 commit comments

Comments
 (0)