def getLanguageList(languageName=None, format='all', getAll=True):
    if not getAll:
        languageName = getSetting('languages')

    if languageName == None:
        dic = []
    elif isinstance(languageName, str):
        dic = [languageName]
    else:
        dic = languageName

    languages = getAllLanguages()
    languages = [(k, languages[k]) for k in sorted(languages.keys())]
    languageList = []
    index = None
    for k, v in languages:
        if languageName == None or dic in k:
            index = len(languageList)
            if format == 'all':
                languageList.append(k + ' ' + v['name'] + ' (' + v['nativeName'] + ')')
            elif format == 'name':
                languageList.append(v['name'])
            elif format == 'nativeName':
                languageList.append(v['nativeName'])
            elif format == 'raw':
                v['shortName'] = k
                languageList.append(v)

    return languageList, index
dataset/ETHPy150Open acabin/docphp/docphp.py/getLanguageList/swapped operands of `in`