On Nov 19, 2007 2:09 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 18 Nov 2007 16:05:15 -0800, Dick Moores <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > TypeError: unsupported operand type(s) for /: 'float' and 'Float' > > > <blink><blink> > > What restrictive system can't even coerce a Python float to their > own internal data type? > > Does that library have any functions for type conversion? Float(1) > (or Float(1.0) ) perhaps?
Coercion works fine; the problem is that Float implements __div__ but not __truediv__. It works if you don't import division from __future__. If you do that, even Float / Float division ceases to work. That is definitely a bug, but not as bad a bug as not being able to coerce floats at all ;-) Fredrik -- http://mail.python.org/mailman/listinfo/python-list