[Python-ideas] universal set object for use in set manipulation

Georg Brandl g.brandl at gmx.net
Fri Jul 24 11:46:24 CEST 2009


Greg Ewing schrieb:
> Andy Kish wrote:
> 
>> It's really annoying to having appropriate identity element for
>> union built in while missing the *correct* identity element for
>> intersection.
> 
> What would
> 
>     for x in set.universal():
>       ...

Since it has to yield all possible Python objects, it could start with
the integers.  It's not likely to run out of them any time soon

<duck>
Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.




More information about the Python-ideas mailing list