1 2 3 4 5 6 7 8 9
enable = False def warn(x): """Print `x` as a warning.""" if enable: print('[Warning]: {}'.format(x)) else: return None