Python is DOOMED! Again!

Sturla Molden sturla.molden at gmail.com
Thu Jan 22 19:44:05 EST 2015


On 22/01/15 23:08, Ian Kelly wrote:

> T = TypeVar('T')
>
> def adder(a: T, b: T) -> T:
>      return a + b
>
> I'm not thrilled about having to actually declare T in this sort of
> situation, but I don't have a better proposal.

Here is a better proposal:

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



Sturla





More information about the Python-list mailing list