I have the concrete example with a method that accepts two timestamps (which are floats) but a type: float
in the annotation doesn't tell you anything about the semantics ..
def myfunc( start_date: float, end_date: float ) -> dict:
"""
:param float start_date: a timestamp of the starting date
:param float end_date: a timestamp of the starting date
"""
# Versus
def myfunc( start_date: datetime.datetime.timestamp,
end_date: datetime.datetime.timestamp ) -> dict:
"""
probably no need to explain.....
"""
The idea would be to have some additional information about the semantic of the annotated type. Maybe this is already possible .. but I am unaware currently.
Thank you for any input on this.