Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a5ea6890
Commit
a5ea6890
authored
Jun 01, 2007
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #1722484: remove docstrings again when running with -OO.
parent
4a700bb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Misc/NEWS
Misc/NEWS
+2
-0
Python/compile.c
Python/compile.c
+2
-1
No files found.
Misc/NEWS
View file @
a5ea6890
...
...
@@ -12,6 +12,8 @@ What's New in Python 2.6 alpha 1?
Core and builtins
-----------------
- Bug #1722484: remove docstrings again when running with -OO.
- Add new attribute names for function objects. All the func_* become
__*__ attributes. (Some already existed, e.g., __doc__ and __name__.)
...
...
Python/compile.c
View file @
a5ea6890
...
...
@@ -1119,7 +1119,8 @@ compiler_body(struct compiler *c, asdl_seq *stmts)
if
(
!
asdl_seq_LEN
(
stmts
))
return
1
;
st
=
(
stmt_ty
)
asdl_seq_GET
(
stmts
,
0
);
if
(
compiler_isdocstring
(
st
))
{
if
(
compiler_isdocstring
(
st
)
&&
Py_OptimizeFlag
<
2
)
{
/* don't generate docstrings if -OO */
i
=
1
;
VISIT
(
c
,
expr
,
st
->
v
.
Expr
.
value
);
if
(
!
compiler_nameop
(
c
,
__doc__
,
Store
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment