python - Difference in ways of importing modules -
 If I have a module called   There may be a list of   please suggest .       How to call imported jobs I think you have   And this:    do you see the differences? The first one requires the name of the module to call the function, while the latter allows you to call the function without any prefix.    But in both ways, it does not change again. Functional Library Import Foo, as the bar fl_bar foo () fl_bar ()     to you  < This last method you can use pre->   You can nick your library, such as   FunctionLibrary , then what do I use in the import when I use The difference is  import the labels function  and  the function library import * ?   function libraries  function or, with a class defined methods and variables, anything   foo () < / Code> and  bar () .    
 Import function library FunctionLibrary.foo () FunctionLibrary.bar ()    < Code> function labry import * foo () times ()   
 allows you to write aliases to call Python functions. You will need it in the case of work (or something) with the same names in your imported module.   
 from the function library fl import bar such as B fl.b () # call FunctionLibrary.bar ()    
 
Comments
Post a Comment