On Tue, 03 Oct 2006 23:13:08 -0500, Robert Kern <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> Has the addition of a Universe Set object ever been suggested. Like U >> = set(0), so that any object was a member of U? > > In [61]: class UniverseSet(object): > ....: def __contains__(self, x): > ....: return True > ....:
Yes. But note that being able to write it yourself is one thing, having it in the Standard Library and known to anyone is another. I have been craving for some similar things for a while, and I'm still not sure if they are good ideas, or brain damage caused by studying functional programming at Uni. For example: - the wildcard object, which compares equal to everything else - infinite xrange()s - the black hole function 'def f(*args): pass' - the identity function 'def f(x): return x' /Jorgen -- // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu \X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list