You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no magic across interpreters. install() basically adds op to builtins so that it could be used in the SAME interpreter process elsewhere. In this case, in the temp2.py, you need to import temp1 so the install() executes before you try to use op. The feature saves you some imports when you have many files in your project.
I created two python file to play with the install() feature:
temp1.py:
temp2.py:
But run the temp2.py, it throws error : NameError: name 'op' is not defined
What is the correct usage of install() ? Thanks !
The text was updated successfully, but these errors were encountered: