是否可以推迟运行功能,直到导入模块?例如,假设我有这样的表达式:python_exe = search_env_for_python() # this might be slow.我想推迟调用search_env_for_python,直到导入多进程模块。有没有一种方法可以延迟函数调用,直到导入模块?
api_nodejs/models/__init__.py", line 14, in <module> File "/home/mayank/.local/lib/python2.7_init__.py", line 24, in <module> File "/home/mayank/.local