Title: Slicings documentation doesn't mention Ellipsis
Type: enhancement Stage: resolved
Components: Documentation Versions:
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, nitishch, rhettinger
Priority: normal Keywords:

Created on 2017-10-15 22:45 by nitishch, last changed 2017-10-16 12:06 by rhettinger. This issue is now closed.

Messages (4)
msg304449 - (view) Author: Nitish (nitishch) * Date: 2017-10-15 22:45
Ellipsis object documentation[1] specifies that Ellipsis is mainly used by Slicings. But Slicing's documentation[2] doesn't mention anything about Ellipsis. Consequently - it is not immediately clear from Ellipsis documentation what it's used for.


msg304452 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-10-16 03:24
In regular Python, the ellipsis isn't used for slicing.  It does have special meaning for numpy.   So, I think the docs may be correct as is.
msg304453 - (view) Author: Nitish (nitishch) * Date: 2017-10-16 06:30
The problem is that while documentation for other objects like Null object, NotImplemented object make it clear what they are used for, documentation for Ellipsis object only says that it's used in slicings and the slicings documentation doesn't cover Ellipsis.

Can we add an example of its usage in Numpy to the docs?
msg304467 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-10-16 12:06
> Can we add an example of its usage in Numpy to the docs?

I don't think we should.   In CPython, the ellipsis has no interesting semantics.  It is something that third-party modules can use however they wish.  It doesn't make sense for CPython docs to cover their usage.
Date User Action Args
2017-10-16 12:06:43rhettingersetstatus: open -> closed
resolution: not a bug
messages: + msg304467

stage: resolved
2017-10-16 06:30:31nitishchsetmessages: + msg304453
2017-10-16 03:24:25rhettingersetnosy: + rhettinger
messages: + msg304452
2017-10-15 22:45:56nitishchcreate