[Python-Dev] Can 3.1 still be built without complex?

Mark Dickinson dickinsm at gmail.com
Thu Oct 15 21:11:25 CEST 2009


On Thu, Oct 15, 2009 at 4:06 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> <skip <at> pobox.com> writes:
>>
>> I notice that WITHOUT_COMPLEX still appears in Python.h and several .c files
>> but nowhere else in the 2.6, 2.7 or 3.1 source, most particularly not in
>> configure or pyconfig.h.in.  Are builds --without-complex still supported?
>> Has it been tested at any time in the recent past?
>
> Is there any point in building without complex? Size reduction perhaps?
> If nobody uses it, we could remove that option. We have trouble staying
> compatible with lots of build options (see how --without-threads is little
> exercised).

Size reduction is the only point I can think of.

There's one respect in which complex is slightly more tightly
integrated in py3k than in trunk:  raising a negative number to a
non-integer power (e.g., (-1)**0.5) gives a complex result in py3k.

In trunk this raises ValueError, which means that the only way to
get a complex number in trunk is if you explicitly ask for one
somehow (e.g., by invoking complex, or using the cmath module,
or using imaginary literals, ...), so it makes slightly more sense
to build without the complex type there.

+1 for removing the WITHOUT_COMPLEX define from py3k.
-0 for removing it from trunk.

Mark


More information about the Python-Dev mailing list