File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ object isn't useful:
109109.. function :: show_code(x, *, file=None)
110110
111111 Print detailed code object information for the supplied function, method,
112- source code string or code object to stdout.
112+ source code string or code object to *file * (or ``sys.stdout `` if *file *
113+ is not specified).
113114
114115 This is a convenient shorthand for ``print(code_info(x), file=file) ``,
115116 intended for interactive exploration at the interpreter prompt.
Original file line number Diff line number Diff line change @@ -146,7 +146,10 @@ def _format_code_info(co):
146146 return "\n " .join (lines )
147147
148148def show_code (co , * , file = None ):
149- """Print details of methods, functions, or code to stdout."""
149+ """Print details of methods, functions, or code to *file*.
150+
151+ If *file* is not provided, the output is printed on stdout.
152+ """
150153 print (code_info (co ), file = file )
151154
152155_Instruction = collections .namedtuple ("_Instruction" ,
You can’t perform that action at this time.
0 commit comments