diff options
author | Guido van Rossum <guido@python.org> | 1997-03-11 18:43:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-03-11 18:43:26 (GMT) |
commit | 1c6a459921b3fbc04f818b95f277302336573dde (patch) | |
tree | 09571f6f3393eda8b5b557cd1b13c078a688118f /Python/bltinmodule.c | |
parent | 7c53111d5b74dbd46ec1acf2328f0ce67732324b (diff) | |
download | cpython-1c6a459921b3fbc04f818b95f277302336573dde.zip cpython-1c6a459921b3fbc04f818b95f277302336573dde.tar.gz cpython-1c6a459921b3fbc04f818b95f277302336573dde.tar.bz2 |
Define __debug__ as 0 if -O is given, 1 otherwise. Also test for
errors in initializing the dictionary.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 29e3393..3d977f4 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__"); } |