micropython-lib/warnings/warnings.py

3 wiersze
111 B
Python

def warn(msg, cat=None, stacklevel=1):
print("%s: %s" % ("Warning" if cat is None else cat.__name__, msg))