In python 3.x, it is entirely expected to utilize return type explanation of a capacity/function, for example,
def foo() -> str:
What is the right explanation for the "void" type?
I'm considering these three options:
def foo() -> None:
- not logical IMO, because None is not a type,
def foo() -> type(None):
- using the best syntax I know for obtaining NoneType,
- omit explicit return type information.
Choice 2. appears to be the most consistent to me, however, I've effectively seen a few occurrences of 1.