Re: [Python-Dev] Signalling NANs

2018-11-10 Thread Nathaniel Smith
On Sat, Nov 10, 2018 at 3:26 PM, Steven D'Aprano wrote: > On Fri, Nov 09, 2018 at 01:17:09PM -0800, Chris Barker via Python-Dev wrote: >> works for me, too: >> >> In [9]: x = cast_int2float(0x7ff80001) >> In [10]: hex(cast_float2int(x)) >> Out[10]: '0x7ff80001' >> >> In [11]: x =

Re: [Python-Dev] Signalling NANs

2018-11-10 Thread Steven D'Aprano
On Fri, Nov 09, 2018 at 01:17:09PM -0800, Chris Barker via Python-Dev wrote: > works for me, too: > > In [9]: x = cast_int2float(0x7ff80001) > In [10]: hex(cast_float2int(x)) > Out[10]: '0x7ff80001' > > In [11]: x = cast_int2float(0x7ff1) > In [12]:

Re: [Python-Dev] Experiment an opt-in new C API for Python? (leave current API unchanged)

2018-11-10 Thread Neil Schemenauer
On 2018-11-09, Dino Viehland wrote: > Rather than adding yet another pre-processor directive for this I would > suggest just adding a new header file that only has the new stable API. > For example it could just be "py.h" or "pyapi.h". It would have all of the > definitions for the stable API. I