[Python] What does the Ellipsis object do?

Discussão em 'Python' iniciado por Stack, Setembro 23, 2024.

  1. Stack

    Stack Membro Participativo

    While idly surfing the namespace I noticed an odd looking object called Ellipsis, it does not seem to be or do anything special, but it's a globally available builtin.

    After a search I found that it is used in some obscure variant of the slicing syntax by Numpy and Scipy... but almost nothing else.

    Was this object added to the language specifically to support Numpy + Scipy? Does Ellipsis have any generic meaning or use at all?

    D:\workspace\numpy>python
    Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> Ellipsis
    Ellipsis

    Continue reading...

Compartilhe esta Página