Re: [Python-Dev] PEP 485 isclose() implementation review requested

2015-05-18 Thread Christian Heimes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2015-05-18 17:49, Chris Barker wrote: > Thanks Cristian, that clears up a couple things -- got it > compiling without warning. > > But I also discovered that I must have not pushed the latest copy > yesterday. > > It's on a machine at home -- I'

Re: [Python-Dev] PEP 485 isclose() implementation review requested

2015-05-18 Thread Chris Barker
Thanks Cristian, that clears up a couple things -- got it compiling without warning. But I also discovered that I must have not pushed the latest copy yesterday. It's on a machine at home -- I'll push it tonight. But the copy on gitHub now is mostly good -- I think the only changes are handling t

Re: [Python-Dev] PEP 485 isclose() implementation review requested

2015-05-17 Thread Christian Heimes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2015-05-18 01:02, Chris Barker wrote: > * Is there a better way to create a False or True than:: > > PyBool_FromLong(0) and PyBool_FromLong(1) You can use the macros Py_RETURN_TRUE and Py_RETURN_FALSE instead of return PyBool_FromLong(0). > *

[Python-Dev] PEP 485 isclose() implementation review requested

2015-05-17 Thread Chris Barker
Folks, After a huge delay, I finally found the time to implement the PEP 485 isclose() function, in C. I tihnk it's time for some review. I appologise for the fact that I have little experience with C, and haven't used the raw C API for years, but it's a pretty simple function, and there's lots of