From 54ebc24c2212962c1929b458fde18c7b6233e2e7 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 2 Oct 2023 16:55:24 -0700 Subject: [PATCH 1/3] Add --inline-caches flag to dis command line --- Lib/dis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/dis.py b/Lib/dis.py index 7e4792e8a8dc62..633c01b6fce56a 100644 --- a/Lib/dis.py +++ b/Lib/dis.py @@ -901,12 +901,14 @@ def _test(): import argparse parser = argparse.ArgumentParser() + parser.add_argument('-C', '--show-caches', action='store_true', + help='show inline caches') parser.add_argument('infile', type=argparse.FileType('rb'), nargs='?', default='-') args = parser.parse_args() with args.infile as infile: source = infile.read() code = compile(source, args.infile.name, "exec") - dis(code) + dis(code, show_caches=args.show_caches) if __name__ == "__main__": _test() From 41f9e669c5682a912282eebc7534550af8c51ec7 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 00:04:30 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst diff --git a/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst b/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst new file mode 100644 index 00000000000000..27b000120ec5b3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst @@ -0,0 +1 @@ +Add `--inline-caches` flag to `dis` command line. From 0fc96fce2ed7bd83136171ab6fd9cf543c3ea2ac Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 2 Oct 2023 17:22:02 -0700 Subject: [PATCH 3/3] Double backticks in news, dammit --- .../next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst b/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst index 27b000120ec5b3..a7c9c0f60feea2 100644 --- a/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst +++ b/Misc/NEWS.d/next/Library/2023-10-03-00-04-26.gh-issue-110249.K0mMrs.rst @@ -1 +1 @@ -Add `--inline-caches` flag to `dis` command line. +Add ``--inline-caches`` flag to ``dis`` command line.