Hi,<br><br>I'm using Python 3.0 (the latest as of now) and I have a very large dictionary that I'm attempting to do some processing on. The dictionary basically has strings in it, as well as other dictionaries which themselves also have strings. Using a display, I'm trying to (with as little code possible) make every single string in the entire dictionary tree lower case by calling lower() on the string. However, python is not accepting my syntax. How do I create nested displays? Thanks. The code is below. Note, also, that the "path" key/value pair should be skipped. I need to lowercase the 'path' key, but the value is not a tuple, and that value should be skipped. The nested display/comprehension logic is at the very bottom.<br>
<span style="font-family: courier new,monospace;"><br>stage_map = {<br>#------------------------------------------------------------------------------------------<br>    "system"            :   {   "path" :    </span><span style="font-family: courier new,monospace;">"C:\mypath"</span><br>
<span style="font-family: courier new,monospace;">                            ,   "debug" :   ( "boost_system-mt-gyd.dll", )<br>                            ,   "release" : ( "boost_system-mt.dll", )<br>
                            }<br>#------------------------------------------------------------------------------------------<br>,    "filesystem"        :  {   "path" :    "C:\mypath"<br>                            ,   "debug" :   ( "boost_filesystem-mt-gyd.dll", )<br>
                            ,   "release" : ( "boost_filesystem-mt.dll", )<br>                            }<br>#------------------------------------------------------------------------------------------<br>
,    "librocket"         :  {   "path" :    </span><span style="font-family: courier new,monospace;">"C:\mypath"<br>                            ,   </span><span style="font-family: courier new,monospace;">"debug" :   ( "EMPCore_d.dll"<br>
                                            , "EMPCorePython_d.dll"<br>                                            , "RocketCore_d.dll"<br>                                            , "RocketDebugger_d.dll"<br>
                                            , "RocketControls_d.dll"<br>                                            )<br>                            ,   "release" : ( "EMPCore.dll"<br>                                            , "EMPCorePython.dll"<br>
                                            , "RocketCore.dll"<br>                                            , "RocketDebugger.dll"<br>                                            , "RocketControls.dll"<br>
                                            )<br>                            }<br>#------------------------------------------------------------------------------------------<br>}<br><br># This does not compile...<br>stage_map = [i.lower() : [ii.lower() : [iii.lower() for iii in jj if jj.lower() != "path"] for ii, jj in j] for i, j in stage_map]</span><br>