OILS / mycpp / util.py View on Github | oilshell.org

21 lines, 8 significant
1"""
2util.py
3"""
4from __future__ import print_function
5
6import sys
7
8from 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
15SMALL_STR = False
16
17
18def log(msg: str, *args: Any) -> None:
19 if args:
20 msg = msg % args
21 print(msg, file=sys.stderr)