Minor patch

This commit is contained in:
Miroslav Stampar 2015-01-07 10:46:06 +01:00
parent c4c4ac13fe
commit 83add9fd9b

View File

@ -23,10 +23,10 @@ def _size_of(object):
Returns total size of a given object (in bytes)
"""
retval = sys.getsizeof(object)
if hasattr(object, "__iter__"):
return sum(_size_of(_) for _ in object)
else:
return sys.getsizeof(object)
retval += sum(_size_of(_) for _ in object)
return retval
class Cache(object):
"""