Ian Kelly <ian.g.ke...@gmail.com> writes: > You couldn't do this with a __future__ import because those must be > confined to the importing module and are therefore generally limited > to syntax changes.
In principle, it could be a syntax change to the < operator (etc) to cause it to try to call a different method first, same as division and the / operator. That'd be a bit heavyweight to do this late in the Python 2 cycle though. What might be nice would be a general way to pass in lexical context information to the methods called to implement operators. > It may be a good candidate for the six library, but > I don't see any existing support there for it. -- https://mail.python.org/mailman/listinfo/python-list