Language Syntax

Ellipsis literal — Python syntax

The three-dot token evaluates to the Ellipsis singleton. It is not an automatic placeholder error; a receiver can interpret it as an indexing key. In an expression statement it has no side effect.

Formal Syntax & Structure

python syntaxpython
...

Return Value

ellipsis

Value obtained by evaluating this expression; see description for context and constraints.

Working Example

Example Snippetpython
class Grid:    def __getitem__(self,key):        return keyprint(Grid()[...,2])
Python Reference