Numeric and the new division operator

Michael James Barber mjbarber at
Thu Jan 3 11:25:25 EST 2002

[true division doesn't work with Numeric]

In article <Xns918BA68A2D43cliechtigmxnet at>,
Chris Liechti  <cliechti at> wrote:
>from the docs:
>__div__(self, other) 
>__truediv__(self, other) 
>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.
>so i think they have not implemented __truediv__.

Ah, that would explain it.   Somehow I missed that in the docs -- too 
focused on finding something related to Numeric, I guess.  Thanks for 
clarifying that.

Looking further on the Numeric site, I have also found this:

Version 20.3
   Please note that the __future__ options wrt integer division in Python 
2.2 are NOT available in Numeric at this time.

at <>.

I guess it's time to wait a bit longer. :(
					Michael J. Barber

More information about the Python-list mailing list