Python is DOOMED! Again!

Emile van Sebille emile at fenx.com
Thu Jan 22 16:56:58 EST 2015


On 1/21/2015 8:30 PM, Steven D'Aprano wrote:

<snip>

> Here's an example from PEP 484:
>
> def greeting(name: str) -> str:
>      return 'Hello ' + name

I've been lightly scanning and following the PEP 484 discussion, and one 
point I don't think I've seen mentioned is how you might hint a function 
that accepts different types, eg:

def adder(a,b): return a+b

This is one of the pythonic idioms that help with polymorphic functions. 
  Is there a proposal for providing hinting for these?

Thanks,

Emile





More information about the Python-list mailing list