parameters: (self, size)
return_statement: return '%0.1f GB' % (size)
docstring: Returns a size in MB, KB, GB, whatever.
docstring_summary: Returns a size in MB, KB, GB, whatever.
docstring_tokens: Returns a size in MB KB GB whatever .
function: def formatSize(self, size):
          """ Returns a size in MB, KB, GB, whatever. """
          if size < 1000:
              return '%s bytes' % (size)
          size /= 1024.0
          if size < 1000:
              return '%0.1f kb' % (size)
          size /= 1024.0
          if size < 1000:
              return '%0.1f MB' % (size)
          size /= 1024.0
          return '%0.1f GB' % (size)
function_tokens: def formatSize ( self , size ) : if size < 1000 : return '%s bytes' % ( size ) size /= 1024.0 if size < 1000 : return '%0.1f kb' % ( size ) size /= 1024.0 if size < 1000 : return '%0.1f MB' % ( size ) size /= 1024.0 return '%0.1f GB' % ( size )