mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Define __debug__ as 0 if -O is given, 1 otherwise. Also test for
errors in initializing the dictionary.
This commit is contained in:
parent
7c53111d5b
commit
1c6a459921
1 changed files with 4 additions and 0 deletions
|
|
@ -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__");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue