https://github.com/python/cpython/commit/0c0fedf289e61ad2dd2b4a59b77a7146fff74c18
commit: 0c0fedf289e61ad2dd2b4a59b77a7146fff74c18
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: encukou <encu...@gmail.com>
date: 2025-05-20T12:17:10Z
summary:

[3.13] gh-53189: Document peculiarities of InteractiveConsole in relation to 
pickle (GH-123069) (GH-134329)

gh-53189: Document peculiarities of InteractiveConsole in relation to pickle 
(GH-123069)

(cherry picked from commit a31bbc951a9d74cd7b9092555c101e51a2b9482b)

Co-authored-by: Serhiy Storchaka <storch...@gmail.com>
Co-authored-by: Terry Jan Reedy <tjre...@udel.edu>

files:
M Doc/library/code.rst

diff --git a/Doc/library/code.rst b/Doc/library/code.rst
index 8f7692df9fb22d..52587c4dd8f8e8 100644
--- a/Doc/library/code.rst
+++ b/Doc/library/code.rst
@@ -22,6 +22,12 @@ build applications which provide an interactive interpreter 
prompt.
    it defaults to a newly created dictionary with key ``'__name__'`` set to
    ``'__console__'`` and key ``'__doc__'`` set to ``None``.
 
+   Note that functions and classes objects created under an
+   :class:`!InteractiveInterpreter` instance will belong to the namespace
+   specified by *locals*.
+   They are only pickleable if *locals* is the namespace of an existing
+   module.
+
 
 .. class:: InteractiveConsole(locals=None, filename="<console>", 
local_exit=False)
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to