[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

Bas van Beek report at bugs.python.org
Fri Sep 18 15:29:00 EDT 2020


New submission from Bas van Beek <bas.vanbeek at hotmail.com>:

`Ellipsis` is one of the few builtin objects whose type is not exposed via the `types` module. 
This is not really an issue during runtime, as you can always call `type(Ellipsis)`, but for the purpose of typing it is detrimental; the lack of suitable type means that it is impossible to properly annotate a function which takes or returns `Ellipsis` (unless one is willing to resort to the use of non-public types: https://github.com/python/typeshed/issues/3556).

In order to resolve this issue I propose to reintroduce `types.EllipsisType`. This should be a fairly simple process, so if there are no objections I'd be willing to give it a shot.

----------
components: Library (Lib)
messages: 377135
nosy: BvB93
priority: normal
severity: normal
status: open
title: Consider reintroducing `types.EllipsisType` for the sake of typing
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41810>
_______________________________________


More information about the Python-bugs-list mailing list