Anton81 wrote: >> If you have the >> >> from __future__ import division >> >> statement, you need to override __truediv__(), not __div__() > > That worked after I also added > from __future__ import division > to all other modules I created. > > Is it possible that there appears an inconsistency if the division is > imported in only some of the modules?
Yes. If you use your class with and without the __future__ option you have to implement both __div__ and __truediv__, I suppose. Peter -- http://mail.python.org/mailman/listinfo/python-list