A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-October/122256.html below:

[Python-Dev] return type of __complex__

[Python-Dev] return type of __complex__ [Python-Dev] return type of __complex__Christian Heimes christian at python.org
Fri Oct 19 18:31:31 CEST 2012
Am 19.10.2012 18:23, schrieb Maciej Fijalkowski:
> Nick just said it's a bug that cmath type checks are too strict.

I'm not so sure about that. cmath just uses PyArg_ParseTuple with "D"
which itself relies upon PyComplex_AsCComplex().

D (complex) [Py_complex]
    Convert a Python complex number to a C Py_complex structure.

In order to fix the bug the code in PyComplex_AsCComplex() must be
altered to support float as return type from __complex__(). That's a
major change.

Christian
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4