aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorRadislav Chugunov <52372310+chgnrdv@users.noreply.github.com>2023-10-11 01:31:28 +0300
committerGitHub <noreply@github.com>2023-10-10 16:31:28 -0600
commit0d805b998ded854840f029b7f0c9a02eb3efa251 (patch)
tree9ab1efedf06694d2f16f504d7f50952acc602d25 /Lib/dis.py
parent732532b0af9d1b5c7ae4932526c8d20d86c15507 (diff)
downloadcpython-0d805b998ded854840f029b7f0c9a02eb3efa251.tar.gz
cpython-0d805b998ded854840f029b7f0c9a02eb3efa251.zip
gh-108826: Document `dis` module CLI and rename `_test` function to `main` (#108827)
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>
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 633c01b6fce..cad62b95990 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -896,8 +896,7 @@ class Bytecode:
return output.getvalue()
-def _test():
- """Simple test program to disassemble a file."""
+def main():
import argparse
parser = argparse.ArgumentParser()
@@ -911,4 +910,4 @@ def _test():
dis(code, show_caches=args.show_caches)
if __name__ == "__main__":
- _test()
+ main()