def append(self, val):
new_len = self.length + len(val)<EOL>to_add = new_len - len(self.bfr)<EOL>if self.strict and to_add > <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.bfr[self.length:new_len] = val<EOL>self.length = new_len<EOL>
Append byte string val to buffer
        If the result exceeds the length of the buffer, behavior
        depends on whether instance was initialized as strict.
        In strict mode, a ValueError is raised.
        In non-strict mode, the buffer is extended as necessary.