1 | """ |
2 | util.py |
3 | """ |
4 | from __future__ import print_function |
5 | |
6 | import sys |
7 | |
8 | from typing import Any |
9 | |
10 | # Used by cppgen_pass and const_pass |
11 | |
12 | # mycpp/examples/small_str.py sorta works with this! |
13 | #SMALL_STR = True |
14 | |
15 | SMALL_STR = False |
16 | |
17 | |
18 | def log(msg: str, *args: Any) -> None: |
19 | if args: |
20 | msg = msg % args |
21 | print(msg, file=sys.stderr) |