[Python-ideas] a in x or in y

Steven D'Aprano steve at pearwood.info
Fri Feb 14 10:41:15 CET 2014


On Fri, Feb 14, 2014 at 01:49:20AM +0200, Ram Rachum wrote about a 
custom "either" class:

> That's nice, but having to import a definition like that would be quite
> cumbersome.

No more cumbersome than any other import. We don't insist that every 
itertools function or maths routine be a built-in, and people manage :-)

The barrier to a new built-in is higher than the barrier to a new module 
or function in a module. I'm not aware of any concrete examples where 
this has happened, but in principle, a really popular function might be 
moved from a module to built-ins.


> Also, this doesn't allow lazy evaluation.

That is a bigger problem with the suggestion. 



-- 
Steven


More information about the Python-ideas mailing list