Steven D'Aprano <[email protected]> writes:
> def median_grouped(data:Iterable[Real], interval:Real=1)->Real: ...
Wow, that's really nice. I had heard something about Python type hints
but hadn't seen them before.
> So how does Python's proposed type-hints compared to that used by other
> languages?
The most closely comparable hinting system I can think of is the Erlang
Dialyzer:
-spec median_grouped(iterable(real())) -> real().
median_grouped(Data, Interval) -> ...
Some more info at:
http://learnyousomeerlang.com/types-or-lack-thereof#for-type-junkies
http://learnyousomeerlang.com/dialyzer#plt
--
https://mail.python.org/mailman/listinfo/python-list