title: Python "Class has no attribute"
body: <p>I'm new to Python and I'm learning about classes and functions and I want to print a class's function but all i get is the error "Class has no attribute"</p>
  
  <p>items.py:</p>
  
  <pre><code>class Item():
      def __init___(self, name, desc, val):
          self.name   = name
          self.desc   = desc
          self.val    = val
  
      def print_info(self):
          return '{}\n==========\n{}\n\nValue: {}'.format(self.name, self.desc, self.val)
  
  class Gold(Item):
      def __init__(self):
          super().__init__(name = "Gold", desc = "Golden coin.", val = str(5))
  </code></pre>
  
  <p>main.py:</p>
  
  <pre><code>from items import Item
  
  print(Item.Gold.print_info)
  </code></pre>
  
  <p>The error is</p>
  
  <pre><code>"AttributeError: type object 'Item' has no attribute 'Gold'"
  </code></pre>