diff options
| author | Guido van Rossum <guido@python.org> | 1997-03-11 18:43:26 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1997-03-11 18:43:26 +0000 |
| commit | 5138bb64c1a109127dbf4cac8ad03230124530f2 (patch) | |
| tree | 7cd2c65f3a6443d8abcf528d8b2100fb7aa78c6f /Python | |
| parent | 139fd3e86d7400ccf3a6a76a6e535a800d9d734e (diff) | |
| download | cpython-5138bb64c1a109127dbf4cac8ad03230124530f2.tar.gz | |
Define __debug__ as 0 if -O is given, 1 otherwise. Also test for
errors in initializing the dictionary.
Diffstat (limited to 'Python')
| -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 29e33939b3..3d977f484a 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__"); } |
