initialize a list of dictionary values
<p>I'd like to know how to statically initialize a list of dictionaries -- something like this:</p>

<p>Originally, I had a list like this:</p>

<pre><code>consumers = ['aserver.foo.com','anotherserver.foo.com',
             'thirdserver.foo.com','lastserver.foo.com']
</code></pre>

<p>But I'd like to have a structure I can address like this:<br></p>

<pre><code>consumers = [
        'aserver'{
            'hostname'='aserver.foo.com',
            'binddn'=masterbinddn,
            'bindpw'=masterbindpw
            },
        'anotherserver'{
            'hostname'='anotherserver.foo.com',
            'binddn'=masterbinddn,
            'bindpw'=masterbindpw
        }, 
        'athirdserver'{
            'hostname'='athirdserver.foo.com',
            'binddn'=targetbinddn,
            'bindpw'=targetbindpw
        }, 
        'lastserver'{
            'hostname'='lastserver.foo.com',
            'binddn'=targetbinddn,
            'bindpw'=targetbindpw
        }
    ]
</code></pre>

<p>The idea being that I can do something like:</p>

<pre><code>for server in consumers:
    do_something_to_server(server['hostname'], server['binddn'], server['bindpw'])
</code></pre>

<p>Am I barking up the wrong tree, or just missing something basic?  </p>
