For "certain reasons" I want to allow python's Ellipsis "..." to (also) be an argument to some function (let's say) f, e.g. as follows:
def f(arg: ?) -> None:
print(arg)
f(...)
what annotation should I use for arg?
It appears (see python doc: https://docs.python.org/3/library/constants.html#Ellipsis) that
from types import EllipsisType
def f(arg: EllipsisType):
print(arg)
f(...) # or alternatively f(Ellipsis)
is the right solution here (i.e. to annotate the Ellipsis itself)