julia counterpart for "from module import some_func" in python -
i find using module
in julia equivalent from module import *
in python. there way import single function or variable module.
you can import e.g. single function with
using module.func
if want able extend function new methods, utilize instead
import module.func
if want import several named functions , variables same module, can e.g. utilize 1 of
using module: func1, func2 import module: func1, func2
all of these forms allow import definitions module
regardless of whether exported there, unlike using module
, imports exported definitions.
also maintain in mind values imported, not variables, if seek assign imported variable, not see alter in originating module (and warning).
julia-lang
No comments:
Post a Comment