🌈 搜索
📅  最后修改于: 2022-03-11 14:45:03.551000             🧑  作者: Mango
def func1(): ... def func2(): ... funcmap = {1 : func1, 2 : func2} def somefunc(a): funcmap[a]() #Ugly! But it works.