def addModlist(entry, ignore_attr_types=None):
 ignore_attr_types = list_dict(map(string.lower, (ignore_attr_types or [])))
 modlist = []
 for attrtype in entry.keys():
  if ignore_attr_types.has_key(string.lower(attrtype)):
   continue
  attrvaluelist = filter((lambda x: (x != None)), entry[attrtype])
  if attrvaluelist:
   modlist.append((attrtype, entry[attrtype]))
 return modlist

def addModlist ( entry , ignore_attr_types = None ) : ignore_attr_types = list_dict ( map ( string . lower , ( ignore_attr_types or [ ] ) ) ) modlist = [ ] for attrtype in entry . keys ( ) : if ignore_attr_types . has_key ( string . lower ( attrtype ) ) : continue attrvaluelist = filter ( ( lambda x : ( x != None ) ) , entry [ attrtype ] ) if attrvaluelist : modlist . append ( ( attrtype , entry [ attrtype ] ) ) return modlist
build modify list for call of method ldapobject .