Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a 'continuing' comment to examples that use SubscriptionDemo
  • Loading branch information
encukou committed Jan 7, 2026
commit 7b3e41d3821e404446f2107b092d37efd8ba7cda
2 changes: 2 additions & 0 deletions Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ Any missing expression evaluates to :const:`None`.
This :class:`!slice` object is then passed to the :meth:`~object.__getitem__`
or :meth:`~object.__class_getitem__` method, as above. ::

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

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

Expand Down
Loading