Re: [Python-Dev] return type of __complex__

2012年10月20日 22:28:54 -0700

I think I've changed my mind on this, since it was pointed
out that if you're going to return a float instead of a
complex, you should really be implementing __float__, not
__complex__.
So I think it's fine to require __complex__ to return a
complex, and the docs should perhaps be clarified on that
point.
Also PyComplex_AsComplex() should perhaps enforce that.
--
Greg
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to