def atom_criteria ( * params ) : result = { } for index , param in enumerate ( params ) : if param is None : continue elif isinstance ( param , int ) : result [ index ] = HasAtomNumber ( param ) else : result [ index ] = param return result
making dictionary from list and conditionals python
An auxiliary function to construct a dictionary of Criteria
def atom_criteria(*params):
    """An auxiliary function to construct a dictionary of Criteria"""
    result = {}
    for index, param in enumerate(params):
        if param is None:
            continue
        elif isinstance(param, int):
            result[index] = HasAtomNumber(param)
        else:
            result[index] = param
    return result