Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
makoで文字列名を指定して関数を呼び出す簡単な方法はありますか?
によって返されるdictでそれを調べることができるはずですglobals()。例えば。:
globals()
<$ func_name = 'my_function_name' %> ${globals()[func_name](...)}
しかし、これは私にはかなり不快なにおいがします。あなたがあなたのエンドゲームを拡張することができれば、おそらく私たちは少し賢い何かを理解することができます。