Is there any difference between "import some_module" and "from some_module import some_func"? I'm speaking in terms of memory usage. I suppose that in both cases we have to read the whole some_module.py. But what happens after? Unused elements of the module are to be removed from memory or they sit there in any case?
— Just the imported function will be loaded in the namespace
— Plus all global variables, plus all subfunctions it interacts with. I'm using psutil method process.memory_info().rss, but I see no difference between the two types of importing.