Python is DOOMED! Again!

Paul Rubin no.email at nospam.invalid
Thu Jan 22 06:35:05 CET 2015


Steven D'Aprano <steve+comp.lang.python at pearwood.info> 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



More information about the Python-list mailing list