title: Why do custom classes and built-in classes in Python have different ways of adding attributes?
body: <pre class="lang-py prettyprint-override"><code>class A():
      def __init__(self):
          self.a = 1
          self.b = 2
  
  a = A()
  a.zzz = 2
  
  b = int()
  b.zzz = 2
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code>Traceback (most recent call last):
    File &quot;/home/user/test.py&quot;, line 10, in &lt;module&gt;
      b.zzz = 2
  AttributeError: 'int' object has no attribute 'zzz'
  </code></pre>
  <p><strong>I don't understand the difference between the class I defined and the int class, why can a custom class add a new attribute, and the original int cannot.</strong></p>