def delete(self, cls, rid, user='<STR_LIT>'):
self.validate_record_type(cls)<EOL>deletedcount = self.db.delete(cls, {ID: rid})<EOL>if deletedcount < <NUM_LIT:1>:<EOL><INDENT>raise KeyError('<STR_LIT>'.format(cls, rid))<EOL><DEDENT>
Delete a record by id.

`user` currently unused. Would be used with soft deletes.

>>> s = teststore()
>>> s.create('tstoretest', {'id': '1', 'name': 'Toto'})
>>> len(s.list('tstoretest'))
1
>>> s.delete('tstoretest', '1')
>>> len(s.list('tstoretest'))
0
>>> s.delete('tstoretest', '1')
Traceback (most recent call last):
    ...
KeyError: 'No record tstoretest/1'