The __div__ method

__div__(self, other)

Called to implement division.

The division operator (/) is implemented by these methods. The __truediv__ method is used when __future__.division is in effect, otherwise __div__ is used. If only one of these two methods is defined, the object will not support division in the alternate context; TypeError will be raised instead.

 

Comment:

__future__.division should be be linked to explanation about it.

Posted by Alexey Shamrin (2006-12-03)

A Django site. this page was rendered by a django application in 0.01s 2010-09-02 15:02:31.063799. hosted by webfaction.