mirror of
https://github.com/python/cpython.git
synced 2024-11-27 03:45:08 +08: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
@ -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…
Reference in New Issue
Block a user