File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,12 @@ def using(self, module):
520520 self .eval ("using %s" % module )
521521
522522
523- class LegacyJulia (Julia ):
523+ class LegacyJulia (object ):
524+ __doc__ = Julia .__doc__
525+
526+ def __init__ (self , * args , ** kwargs ):
527+ self .__julia = Julia (* args , ** kwargs )
528+ __init__ .__doc__ = Julia .__init__ .__doc__
524529
525530 def __getattr__ (self , name ):
526531 from julia import Main
@@ -529,7 +534,10 @@ def __getattr__(self, name):
529534 " deprecated. Use `from julia import Main; Main.<name>` or"
530535 " `jl = Julia(); jl.eval('<name>')`." ,
531536 DeprecationWarning )
532- return getattr (Main , name )
537+ try :
538+ return getattr (self .__julia , name )
539+ except AttributeError :
540+ return getattr (Main , name )
533541
534542
535543sys .meta_path .append (JuliaImporter ())
You can’t perform that action at this time.
0 commit comments