'Return index of name in list, appending if necessary
This routine uses a list instead of a dictionary, because a
dictionary can\'t store two different keys if the keys have the
same value but different types, e.g. 2 and 2L.  The compiler
must treat these two separately, so it does an explicit type
comparison before comparing the values.'

def _lookupName(self, name, list):

    t = type(name)
    for i in range(len(list)):
        if ((t == type(list[i])) and (list[i] == name)):
            return i
    end = len(list)
    list.append(name)
    return end
