def _idIndex(lst, el):
    """Return index of first appeareance of element el in list lst"""

    for i, e in enumerate(lst):
        if e is el:
            return i
    raise ValueError('element %r not found' % el)