[Python-Dev] test_builtin failing? or just 64-bit platforms (original) (raw)

Guido van Rossum guido@python.org
Sun, 02 Dec 2001 18:57:41 -0500


-1 isn't mentioned at all. What does the final C99 say? Regardless, MS's pre-C99 implementation says: [...] So -1 sounds Linux-specific.

Being a Unix old-timer, I cringe every time I see someone test for errors using "== -1". Except for anomalies like getpid() (which in the olden days could return any negative value except -1 as a legitimate pid), for the caller any negative value should be interpreted as an error, and tested for with "< 0". Never mind that most functions return -1. -1000 is just as much an error.

Unhelpfully,

--Guido van Rossum (home page: http://www.python.org/~guido/)