gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)
(cherry picked from commit
a31bbc951a9d74cd7b9092555c101e51a2b9482b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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)