[Python-Dev] return type of complex (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Mon Oct 22 02:10:13 CEST 2012
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven D'Aprano wrote:
When you're dealing with numbers that represent real quantities, getting a complex result is nearly always an error condition. Better to get an exception at the point that occurs, than somewhere distant when the number gets fed to %f formatting, or worse, no error at all, just a silently generating garbage results.
Yeah. I don't think Inland Revenue would be very impressed if I tried to tell them I had imaginary tax-to-pay, advantageous though it might be for me.
-- Greg
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]