[Python-Dev] return type of complex (original) (raw)
Mark Dickinson dickinsm at gmail.com
Fri Oct 19 18:31:07 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 ]
On Fri, Oct 19, 2012 at 4:26 PM, Benjamin Peterson <benjamin at python.org> wrote:
2012/10/19 Antonio Cuni <anto.cuni at gmail.com>:
indeed, you are right. So I suppose that in pypy we could just relax the check in cmath and be happy. Is there any chance that this will be changed in 2.7 and/or 3.x? Certainly 3.x, but not 2.7.
+1 for relaxing the check in 3.x.
The cmath code uses "PyArg_ParseTuple(args, "D", ...) for this; perhaps it's the "D" format for PyArg_ParseTuple that should be relaxed. It seems more than reasonable to allow floats wherever a complex number is expected.
Mark
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]