summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2023-10-11 20:48:03 (GMT)
committerGitHub <noreply@github.com>2023-10-11 20:48:03 (GMT)
commitfd061a9bbe5b46c295ebe0d76b4411d0345efc7d (patch)
tree52e3ac62c6ddfcfb130278e9e00c7e307e20f361 /Lib/dis.py
parentad504156372932922409b75d051a755008e40fb6 (diff)
downloadcpython-fd061a9bbe5b46c295ebe0d76b4411d0345efc7d.zip
cpython-fd061a9bbe5b46c295ebe0d76b4411d0345efc7d.tar.gz
cpython-fd061a9bbe5b46c295ebe0d76b4411d0345efc7d.tar.bz2
[3.11] gh-108826: Document `dis` module CLI and rename `_test` function to `main` (#108827) (#110689)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index 5bf52c3..196c886 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -759,8 +759,7 @@ class Bytecode:
return output.getvalue()
-def _test():
- """Simple test program to disassemble a file."""
+def main():
import argparse
parser = argparse.ArgumentParser()
@@ -772,4 +771,4 @@ def _test():
dis(code)
if __name__ == "__main__":
- _test()
+ main()