[Python-Dev] Compiler warnings
Tim Peters
tim.peters at gmail.com
Wed Feb 1 23:42:36 CET 2006
[Thomas]
> Done,
Thanks!
> although it was nowhere near obvious to me that -1 would be a sane
> sentinel value ;) Not that I don't believe you, but it took some actual
> reading of _PyLong_AsScaledDouble to confirm it.
Nope, the thing to do was to read the docs for _PyLong_AsScaledDouble,
which explicitly promise e >= 0. That's what I did :-) "The docs"
are in longobject.h. You can tell which functions I wrote, BTW,
because they're the ones with comments in the header file documenting
what they do. It's an ongoing mystery to me why nobody else found
that to be a practice worth emulating ;-)/:-(
More information about the Python-Dev
mailing list