[Bf-blender-cvs] [81b64e5] master: API Docs: use a simpler example for merging namespaces

Campbell Barton noreply at git.blender.org
Fri Dec 27 04:31:12 CET 2013


Commit: 81b64e506f26de58ffaff5b61a92179ae8015aec
Author: Campbell Barton
Date:   Fri Dec 27 14:20:08 2013 +1100
https://developer.blender.org/rB81b64e506f26de58ffaff5b61a92179ae8015aec

API Docs: use a simpler example for merging namespaces

===================================================================

M	doc/python_api/rst/info_tips_and_tricks.rst

===================================================================

diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst
index 75e8ef6..7932594 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.




More information about the Bf-blender-cvs mailing list