merge version

This commit is contained in:
JJJHolscher 2023-12-12 14:55:39 +01:00
commit 238e1fb880

View File

@ -16,9 +16,9 @@ def sizeof_fmt(num, suffix='B'):
num /= 1024.0
return "%.1f %s%s" % (num, 'Yi', suffix)
def print_largest_variables(top=10):
def print_largest_variables(variables, top=10):
""" Print the names and sizes of the top largest variables. """
variables = list(locals().items())
variables = list(variables.items())
variables_with_sizes = ((name, sys.getsizeof(value)) for name, value in variables)
if not top: