I earlier researched lazy import of modules and found this way of doing it:
def some_funk():
lazy_module = __import__("lazy_module")
lazy_obj = lazy_module.LazyClass()
lazy_obj.do_stuff()
Then I've seen some examples simply using:
def some_funk()
import lazy_module
lazy_obj = lazy_module.LazyClass()
lazy_obj.do_stuff()
I prefer the later use and will rewrite my code to this.
But my question is if there is any difference between the two ways of doing lazy imports