accessing dictionary with classes
<p>I am learning OOP with python.
I want to implement something like to display:
<code>firstName</code>, <code>lastName</code> of a person with address as dictionary like, <code>'state': someState, 'city': someCity</code></p>

<p>I've done:</p>

<pre><code>class data:
    def __init__(self, firstName, lastName, **address):
        self.firstName = firstName
        self.lastName = lastName
        self.address = {
            "state": self.state,
            "city" : self.city
        }
</code></pre>

<p>When I did:</p>

<pre><code>&gt;&gt;&gt; d = data("a", "b", 'state' : "stat", 'city' : "ci")
SyntaxError: invalid syntax
&gt;&gt;&gt; d = data("a", "b", 'state'="stat", 'city'="ci")
SyntaxError: keyword can't be an expression
</code></pre>

<p>Is there mistake with my code or the syntax of accessing dictionary is mistake. I can not figure it out.</p>
