Initialize a string variable in Python: "" or None?
<p>Suppose I have a class with a <strong>string</strong> instance attribute.
Should I initialize this attribute with <strong>""</strong> value or <strong>None</strong>? Is either okay?</p>

<pre><code>def __init__(self, mystr="")
   self.mystr = mystr
</code></pre>

<p>or</p>

<pre><code>def __init__(self, mystr=None)
   self.mystr = mystr
</code></pre>

<p><strong>Edit</strong>: What I thought is that if I use <strong>""</strong> as an initial value, I "<em>declare</em>" a variable to be of <strong>string</strong> type. And then I won't be able to assign any other type to it later. Am I right?</p>

<p><strong>Edit</strong>: I think it's important to note here, that my suggestion was WRONG. And there is no problem to assign another type to a variable. I liked a comment of <strong>S.Lott</strong>: "<em>Since nothing in Python is "declared", you're not thinking about this the right way.</em>"</p>
