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 f7661da commit 28f0218Copy full SHA for 28f0218
Doc/howto/multiple-interpreters.rst
@@ -420,6 +420,12 @@ executed with :data:`!__name__` set to something other than
420
put it in the if block. You will probably only want functions or
421
classes outside the if block.
422
423
+Another thing to keep in mind is that, when you run the REPL or run
424
+``python -c ...``, the code that runs is essentially unrecoverable. The
425
+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
Calling Methods and Other Objects in an Interpreter
430
---------------------------------------------------
431
0 commit comments