On 02/23/2013 02:38 PM, Chris Angelico wrote: > On Sun, Feb 24, 2013 at 5:29 AM, Dennis Lee Bieber > <wlfr...@ix.netcom.com> wrote: >> Error codes under DEC VAX/VMS used odd integers for >> "success/information" and even integers for "warning/error" (been too >> many years, I think positive integers were success/warning, negative >> integers were information/error; I could also be wrong on which set were >> even... if 0 were no-info/success then odd were errors and even were >> success)). > > Sounds like IBM DB2 and sqlca.sqlcode - 0 for success, <0 for error, >> 0 for warning (or in some cases "status" - an SQLCODE of 100 means > "end of result set", which isn't exactly an error but you can't fetch > any more from it; it's akin to Python raising StopIteration to > terminate a for loop).
All apps that return an error code to the operating system return 0 for success, any other value for error. All command-line utilities work this way, all shells, etc. Even Windows command-line apps work this way (errorlevel is what they call it). -- http://mail.python.org/mailman/listinfo/python-list