'Analyse types for buffer indexing only. Overridden by memoryview
indexing and slicing subclasses'

def analyse_types(self, env, getting=True):

    if ((not self.base.is_name) and (not is_pythran_expr(self.base.type))):
        error(self.pos, 'Can    only    index    buffer    variables')
        self.type = error_type
        return self
    if (not getting):
        if (not self.base.entry.type.writable):
            error(self.pos, 'Writing    to    readonly    buffer')
        else:
            self.writable_needed = True
            if self.base.type.is_buffer:
                self.base.entry.buffer_aux.writable_needed = True
    self.none_error_message = "'NoneType'    object    is    not    subscriptable"
    self.analyse_buffer_index(env, getting)
    self.wrap_in_nonecheck_node(env)
    return self
