File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -584,11 +584,18 @@ can be overridden by the local file.
584
584
585
585
.. pdbcommand :: interact
586
586
587
- Start an interactive interpreter (using the :mod: `code ` module) whose global
588
- and local namespaces correspond to the global and local namespaces in the
587
+ Start an interactive interpreter (using the :mod: `code ` module) in a new
588
+ global namespace initialised from the local and global namespaces for the
589
589
current scope. Use ``exit() `` or ``quit() `` to exit the interpreter and
590
590
return to the debugger.
591
591
592
+ .. note ::
593
+
594
+ As ``interact `` creates a new dedicated namespace for code execution,
595
+ assignments to variables will not affect the original namespaces.
596
+ However, modifications to any referenced mutable objects will be reflected
597
+ in the original namespaces as usual.
598
+
592
599
.. versionadded :: 3.2
593
600
594
601
.. versionchanged :: 3.13
@@ -599,11 +606,6 @@ can be overridden by the local file.
599
606
:pdbcmd: `interact ` directs its output to the debugger's
600
607
output channel rather than :data: `sys.stderr `.
601
608
602
- .. versionchanged :: 3.13
603
- The implementation of :pep: `667 ` means that name assignments made via the
604
- interactive console will directly affect the active scope, even when
605
- running inside a function, generator, or coroutine.
606
-
607
609
.. _debugger-aliases :
608
610
609
611
.. pdbcommand :: alias [name [command]]
You can’t perform that action at this time.
0 commit comments