-
-
Save anonymous/c6ee1be4befc1c38d34cd02553b31945 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import builtins | |
import functools | |
import json | |
orig_print = builtins.print | |
def indent4(f): | |
@functools.wraps(f) | |
def wrapped(*args, **kwargs): | |
return f(json.dumps(*args, **kwargs, indent=4)) | |
return wrapped | |
@indent4 | |
def print(*args, **kwargs): | |
return orig_print(*args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment