_______________________________________________On Wed, Jun 17, 2020 at 12:57 PM Stephan Hoyer <shoyer@gmail.com> wrote:On Wed, Jun 17, 2020 at 12:21 PM Martin DeMello via Typing-sig <typing-sig@python.org> wrote:This came up internally - pytype supports `ellipsis` as a global definition in type stubs, and the poster was wondering how portable it was (seeing as how it's not directly accessible in python itself). Are other type checkers okay with `ellipsis` used as a type?I think there would be a good case for special-casing Ellipsis like None, i.e., to allow annotating Ellipsis values with just Ellipsis rather than ellipsis.Both Ellipsis and None are singleton objects, and aside from type-checking there is no need to refer to their types (which are somewhat of an implementation detail).One problem I can see with that is that `Ellipsis` is a synonym for `...` and using a literal `...` already has a special meaning in type stubs. (The OP wanted pytype to support `Type[...]` but I felt that was a bad idea, and similarly `Literal[...]` would likely not be advisable.)martin
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: guido@python.org