INNER CODE UNIT · Python
MIN_LARGE_OBJECT_SIZE
autokitteh/autokitteh · runtimes/pythonrt/runner/main.py:244
MIN_LARGE_OBJECT_SIZE = 1 * 1024 * 1024
def format_size(size):
if size < 1024:
return f"{size} B"
elif size < 1024 * 1024:
return f"{size // 1024} KB"
else:
return f"{size // (1024 * 1024)} MB"
def pickleable_exception(err):
"""Convert Exception to be pickleable by making un-pickled attribute None."""
# Make Err subclass to exception handling will work
class Err(err.__class__):
def __init__(self):