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
c02adca9
Commit
c02adca9
authored
Sep 10, 2010
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Leave show_code out of __all__ and make it clear that its lack of documentation is deliberate
parent
7646f7ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Lib/dis.py
Lib/dis.py
+5
-1
No files found.
Lib/dis.py
View file @
c02adca9
...
...
@@ -7,7 +7,7 @@ from opcode import *
from
opcode
import
__all__
as
_opcodes_all
__all__
=
[
"code_info"
,
"dis"
,
"disassemble"
,
"distb"
,
"disco"
,
"findlinestarts"
,
"findlabels"
,
"show_code"
]
+
_opcodes_all
"findlinestarts"
,
"findlabels"
]
+
_opcodes_all
del
_opcodes_all
_have_code
=
(
types
.
MethodType
,
types
.
FunctionType
,
types
.
CodeType
,
type
)
...
...
@@ -140,6 +140,10 @@ def _format_code_info(co):
lines
.
append
(
"%4d: %s"
%
i_n
)
return
"
\
n
"
.
join
(
lines
)
# show_code is deliberately undocumented and left out of __all__,
# since it doesn't offer any real benefit over code_info() above
# It is only retained because it already existed and was not
# marked as private in previous versions of Python
def
show_code
(
co
):
"""Show details about a code object."""
print
(
code_info
(
co
))
...
...
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