On 30/09/2018 16:36, David Mertz wrote:
> On Sun, Sep 30, 2018 at 11:31 AM Steve Barnes <gadgetst...@live.co.uk 
> <mailto:gadgetst...@live.co.uk>> wrote:
> 
>     No complex can be converted to float without accessing either the real
>     or imag component.
> 
> 
> Sure. Not in Python 3.7.  But mathematically, it seems really 
> straightforward to say that Complex numbers that lie on the Real line 
> (i.e. imaginary part is zero) map in an obvious way to Real numbers.
> 
> I haven't done an inventory, but I'd guess most—but not all—other PLs do 
> the same thing Python does.
> 
Personally I agree that float(2.0+0j) should possibly be a valid value 
(2.0) but there is the complication, as always, of how near zero is 
zero. But that is a battle for another time.

-- 
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect 
those of my employer.

---
This email has been checked for viruses by AVG.
https://www.avg.com

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to