my_fun()Pythonでは、からインポートしたいのですmymoduleが、それでもmymodule.my_fun(). どうやってやるの?
これまでのところ、次の不満足なオプションについてしか知りません。
import mymodule # imports all functions :(
mymodule.my_fun()
from mymodule import my_fun
my_fun() # not referred as mymodule.my_fun() :(
このようなものは素晴らしいでしょう:
from mymodule import my_fun
mymodule.my_fun()