From 81b64e506f26de58ffaff5b61a92179ae8015aec Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Dec 2013 14:20:08 +1100 Subject: API Docs: use a simpler example for merging namespaces --- doc/python_api/rst/info_tips_and_tricks.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst index 75e8ef61f6f..793259401b8 100644 --- a/doc/python_api/rst/info_tips_and_tricks.rst +++ b/doc/python_api/rst/info_tips_and_tricks.rst @@ -214,7 +214,7 @@ The next example is an equivalent single line version of the script above which .. code-block:: python - __import__('code').interact(local={k: v for ns in (globals(), locals()) for k, v in ns.items()}) + __import__('code').interact(local=dict(globals(), **locals())) ``code.interact`` can be added at any line in the script and will pause the script an launch an interactive interpreter in the terminal, when you're done you can quit the interpreter and the script will continue execution. -- cgit v1.2.3