We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28f0218 commit 1b79755Copy full SHA for 1b79755
1 file changed
Doc/howto/multiple-interpreters.rst
@@ -426,6 +426,11 @@ contents of the :mod:`__main__` module cannot be reproduced by executing
426
a script (or module) file. Consequently, calling a function defined
427
in :mod:`__main__` in these cases will probably fail.
428
429
+Here's one last tip before we move on. You can avoid the extra
430
+complexity involved with functions (and classes) defined in
431
+:mod:`__main__` by simply not defining them in :mod:`__main__`.
432
+Instead, put them in another module and import them in your script.
433
+
434
Calling Methods and Other Objects in an Interpreter
435
---------------------------------------------------
436
0 commit comments