8000 [3.14] gh-53189: Document peculiarities of InteractiveConsole in rela… · python/cpython@a3fa725 · GitHub
[go: up one dir, main page]

Skip to content

Commit a3fa725

Browse files
miss-islingtonserhiy-storchakaterryjreedy
authored
[3.14] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134328)
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (cherry picked from commit a31bbc9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent c23bdc2 commit a3fa725

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/code.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ build applications which provide an interactive interpreter prompt.
2222
it defaults to a newly created dictionary with key ``'__name__'`` set to
2323
``'__console__'`` and key ``'__doc__'`` set to ``None``.
2424

25+
Note that functions and classes objects created under an
26+
:class:`!InteractiveInterpreter` instance will belong to the namespace
27+
specified by *locals*.
28+
They are only pickleable if *locals* is the namespace of an existing
29+
module.
30+
2531

2632
.. class:: InteractiveConsole(locals=None, filename="<console>", local_exit=False)
2733

0 commit comments

Comments
 (0)
0