if callable(self.check_record_func):
return self.check_record_func(self, record)
else:
- raise TypeError, "non-callable restriction function"
+ raise TypeError("non-callable restriction function")
else:
return 1
if line[-1] == '\n':
line = line[:-1] # Chop
- l = string.split(line, self.key_sep, 1) # Just split to key and reminder
+ l = line.split(self.key_sep, 1) # Just split to key and reminder
return tuple(l)
# so it is not ready to be checked :(
# And, of course, two keys with the same name
# cannot be added to dictionary
- raise KeyError, "field key \"" + key + "\" already in record"
+ raise KeyError("field key \"" + key + "\" already in record")
record[key] = value