parameters: (self)
return_statement: return "{0:.2f} {1:s}".format(size, unit)
docstring: :return: A string of the human readible size for the device.
docstring_summary: :return: A string of the human readible size for the device.
docstring_tokens: : return : A string of the human readible size for the device .
function: def size_hr(self):
          """
          :return: A string of the human readible size for the device.
          """
          units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']
          unit = units.pop(0)
          size = self.size
          while units and size > 1024:
              size /= 1024.0
              unit = units.pop(0)
          return "{0:.2f} {1:s}".format(size, unit)
function_tokens: def size_hr ( self ) : units = [ 'B' , 'KB' , 'MB' , 'GB' , 'TB' , 'PB' , 'EB' ] unit = units . pop ( 0 ) size = self . size while units and size > 1024 : size /= 1024.0 unit = units . pop ( 0 ) return "{0:.2f} {1:s}" . format ( size , unit )