On Sat, 02 Oct 2010 14:09:15 -0700, geremy condra wrote: > I'd actually love the ability to overload this, although I'm not sold on > the itertools.chain thing. To me it looks a lot like the 'is isomorphic' > operator from graph theory, and we could really use that in Graphine.
You can overload the ~ operator, although only as a unary operator, not binary: >>> class K: ... def __invert__(self): ... return "Inverted" ... >>> ~K() 'Inverted' -- Steven -- http://mail.python.org/mailman/listinfo/python-list