title: What's the difference between class attributes and data attributes in python
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/207000/python-difference-between-class-and-instance-attributes">Python: Difference between class and instance attributes</a>  </p>
  </blockquote>
  
  
  
  <pre><code>class a:
      m = 1
      def __init__(self):
          self.n = 2
  </code></pre>
  
  <p>According to the book I am reading, <code>m</code> is called class attributes and <code>n</code> is called data attributes, but what's the difference between them? </p>
  
  <p>It seems that the operations of them is nearly same. The only difference I can tell is one is in the function <code>__init__</code> and another isn't.</p>