"""
Class to represent memory database.
FLAD database is a list of records,
"""
Class to represent memory database.
FLAD database is a list of records,
# field_sep = rec_sep = '\n'
def __init__(self, check_record_func = None, key_sep = def_keysep):
# field_sep = rec_sep = '\n'
def __init__(self, check_record_func = None, key_sep = def_keysep):
- def __setslice__(self, i, j, list):
- if list:
- copy_list = list[:]
- for item in list:
+ def __setslice__(self, i, j, v_list):
+ if v_list:
+ copy_list = v_list[:]
+ for item in v_list:
- UserList.__setslice__(self, i, j, copy_list)
+ list.__setslice__(self, i, j, copy_list)
def insert(self, i, item):
if not self.check_record(item):
self.checking_error()
else:
def insert(self, i, item):
if not self.check_record(item):
self.checking_error()
else:
def split_key(self, line):
"""
Split input line to key/value pair and add the pair to dictionary
"""
def split_key(self, line):
"""
Split input line to key/value pair and add the pair to dictionary
"""