(pattern)
| 16 | |
| 17 | |
| 18 | def compile_pattern_with_fast_locals(pattern): |
| 19 | source = textwrap.dedent( |
| 20 | f""" |
| 21 | def f(x): |
| 22 | match x: |
| 23 | case {pattern}: |
| 24 | pass |
| 25 | """ |
| 26 | ) |
| 27 | namespace = {} |
| 28 | exec(source, namespace) |
| 29 | return namespace["f"].__code__ |
| 30 | |
| 31 | |
| 32 | def count_instr_recursively(f, opname): |
no test coverage detected
searching dependent graphs…