Bas van Beek <bas.vanb...@hotmail.com> added the comment:

If you're asking whether or not one can infer the return type of 
`type(Ellipsis)` then yes. 
In such case the inferred type is `builtins.ellipsis`, which is a private 
stub-only class (see the referenced typeshed issue in my original post).

If you're asking if a valid annotation can be constructed from `type(Ellipsis)` 
then the answer is unfortunately no (see below for a few examples).

```
EllipsisType = type(Ellipsis)

# Both examples are considered invalid
def func1(a: type(Ellipsis): ...
def func2(a: EllipsisType): ...

```

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41810>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to