correct way to define class variables in Python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1537202/variables-inside-and-outside-of-a-class-init-function">Variables inside and outside of a class <strong>init</strong>() function</a>  </p>
</blockquote>



<p>I have been using some different code in Pyhton, and noticed people initializes class attributes in two different ways:</p>

<p>The first one like this:</p>

<pre><code>class MyClass:
  __element1 = 123
  __element2 = "this is Africa"

  def __init__(self):
    #pass or something else
</code></pre>

<p>And the other style looks like:</p>

<pre><code>class MyClass:
  def __init__(self):
    self.__element1 = 123
    self.__element2 = "this is Africa"
</code></pre>

<p>What do you say is the correct way?</p>
