def cond_pop(ol,index,**kwargs):
cond_func = kwargs['<STR_LIT>']<EOL>cond_func_args = kwargs['<STR_LIT>']<EOL>index = uniform_index(index,ol.__len__())<EOL>if('<STR_LIT>' in kwargs):<EOL><INDENT>mode = kwargs["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>mode = "<STR_LIT>"<EOL><DEDENT>value = ol[index]<EOL>cond = cond_func(index,value,*cond_func_args)<EOL>if(mode == "<STR_LIT>"):<EOL><INDENT>new = copy.deepcopy(ol)<EOL>if(cond):<EOL><INDENT>popped = new.pop(index)<EOL><DEDENT>else:<EOL><INDENT>popped = new<EOL><DEDENT>return({'<STR_LIT>':popped,'<STR_LIT:list>':new})<EOL><DEDENT>else:<EOL><INDENT>if(cond):<EOL><INDENT>popped = ol.pop(index)<EOL><DEDENT>else:<EOL><INDENT>popped = ol<EOL><DEDENT>return(popped)<EOL><DEDENT>
from elist.jprint import pobj
from elist.elist import *
ol = [{'data':0;'type':'number'},{'data':'x';'type':'str'},{'data':'y';'type':'str'},4]
#cond_func_args is a array
def cond_func(index,value,cond_func_args):