summaryrefslogtreecommitdiff
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-08-23 22:41:39 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2013-08-23 22:41:39 +0300
commit6e6c6ac3d7ccd235d8cb6835db85a432ac0ccba5 (patch)
treeda5ea5f649b27e07d46dc8df93677e30d04d0331 /Lib/dis.py
parentf79126f373a9d5c9b584a8db736fe490fcbfa77a (diff)
downloadcpython-git-6e6c6ac3d7ccd235d8cb6835db85a432ac0ccba5.tar.gz
#18796: improve documentation of the file argument of dis.show_code. Initial patch by Vajrasky Kok.
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index ca4094c1bb..0d62c0828c 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -146,7 +146,10 @@ def _format_code_info(co):
return "\n".join(lines)
def show_code(co, *, file=None):
- """Print details of methods, functions, or code to stdout."""
+ """Print details of methods, functions, or code to *file*.
+
+ If *file* is not provided, the output is printed on stdout.
+ """
print(code_info(co), file=file)
_Instruction = collections.namedtuple("_Instruction",