[Python-Dev] dpython interaction with imaginary types

Michael McLay mclay@nist.gov
Fri, 27 Jul 2001 16:40:38 -0400

Paul F. Dubois  writes:
> In dpython, what is 2.0j? Is the "standard" way of writing complex numbers,
> 3.0 + 2.0j, valid?

If this expression is placed in a module with a  '.py' extension it will work 
exactly as it does today.  

An exception will be raised if the expression is in a '.dp' module because 
the 3.0 would be a decimal number and the complex type is expecting a binary 
number for the real portiion.