Python is DOOMED! Again!

Sturla Molden sturla.molden at gmail.com
Fri Jan 23 01:44:05 CET 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