Python is DOOMED! Again!

Mario Figueiredo marfig at gmail.com
Thu Jan 22 12:12:55 CET 2015


 Chris,

> On Thu, Jan 22, 2015 at 9:46 PM, Nicholas Cole
> <nicholas.cole at gmail.com> wrote:
> 
>> Hang on! The particular example may not make a lot of sense but there
>> are plenty of places in ordinary Python where functions can accept
>> different objects in arguments and return different things. The point
>> here is that that will become rapidly messy and hard to read.
>> 
> Yes; but with proper use of TypeVar can simplify things a lot - have a
> read of the PEP.
> 
> ChrisA
> 

I agree. TypeVar will help tremendously by removing the need for union in 
cases of object inheritance. But only on cases of object inheritance.





More information about the Python-list mailing list