def push(self, item, *, index=None):
if index is None:<EOL><INDENT>self.__list.append(item)<EOL><DEDENT>else:<EOL><INDENT>self.__list.insert(index, item)<EOL><DEDENT>name = getattr(item, '<STR_LIT:name>', None)<EOL>if name is not None:<EOL><INDENT>self.__dict[name] = item<EOL><DEDENT>
Push item to the chain.