Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita31bbc9

Browse files
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent175ba36 commita31bbc9

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)

[8]ページ先頭

©2009-2025 Movatter.jp