(self)
Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
        or file.
Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
        or file.
Return the category of this SimMemory instance . It can be one of the three following categories : reg mem or file .
def category(self):
        """
        Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
        or file.
        """

        if self.id in ('reg', 'mem'):
            return self.id

        elif self.id.startswith('file'):
            return 'file'

        elif '_' in self.id:
            return self.id.split('_')[0]

        else:
            raise SimMemoryError('Unknown SimMemory category for memory_id "%s"' % self.id)
def category ( self ) : if self . id in ( 'reg' , 'mem' ) : return self . id elif self . id . startswith ( 'file' ) : return 'file' elif '_' in self . id : return self . id . split ( '_' ) [ 0 ] else : raise SimMemoryError ( 'Unknown SimMemory category for memory_id "%s"' % self . id )