mirror of
https://github.com/python/cpython.git
synced 2025-10-16 19:57:59 +00:00
Implement -OO; "unsafe" optimization that removes docstrings.
Marc-Andre Lemburg.
This commit is contained in:
parent
6b86a42c7f
commit
541563ec7e
1 changed files with 3 additions and 0 deletions
|
@ -2646,6 +2646,9 @@ static PyObject *
|
|||
get_docstring(n)
|
||||
node *n;
|
||||
{
|
||||
/* Don't generate doc-strings if run with -OO */
|
||||
if (Py_OptimizeFlag > 1)
|
||||
return NULL;
|
||||
n = get_rawdocstring(n);
|
||||
if (n == NULL)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue