'Create a new base with specified field names
A keyword argument mode can be specified ; it is used if a file
with the base name already exists
- if mode = \'open\' : open the existing base, ignore the fields
- if mode = \'override\' : erase the existing base and create a
new one with the specified fields'

def create(self, *fields, **kw):

    self.mode = mode = kw.get('mode', None)
    if os.path.exists(self.name):
        if (not os.path.isfile(self.name)):
            raise IOError(('%s    exists    and    is    not    a    file' % self.name))
        elif (mode is None):
            raise IOError(('Base    %s    already    exists' % self.name))
        elif (mode == 'open'):
            return self.open()
        elif (mode == 'override'):
            os.remove(self.name)
    self.fields = list(fields)
    self.records = {}
    self.next_id = 0
    self.indices = {}
    self.commit()
    return self
