From: Guido van Rossum Date: Tue, 11 Mar 1997 18:43:26 +0000 (+0000) Subject: Define __debug__ as 0 if -O is given, 1 otherwise. Also test for X-Git-Tag: v1.5a1~294 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c6a459921b3fbc04f818b95f277302336573dde;p=thirdparty%2FPython%2Fcpython.git Define __debug__ as 0 if -O is given, 1 otherwise. Also test for errors in initializing the dictionary. --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 29e33939b30d..3d977f484a72 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1682,6 +1682,10 @@ initbuiltin() initerrors(); (void) dictinsert(builtin_dict, "None", None); (void) dictinsert(builtin_dict, "Ellipsis", Py_Ellipsis); + (void) dictinsert(builtin_dict, "__debug__", + newintobject(Py_OptimizeFlag == 0)); + if (err_occurred()) + fatal("error creating None/Ellipsis/__debug__ in __builtin__"); }