title: python classes methods of methods
body: <p>since I am pretty new to python I might be asking an obvious or silly question, but I really want to learn that concept.</p>
  
  <pre><code>class Classname:
       def method_1(self):
          ........
        ...................
  
  
  
  instance = Classname()
  
  instance.method_1.method_of_1.method_n
  </code></pre>
  
  <p>My questions is if this syntax implies the <code>method_1</code> , <code>method_of_1</code> and <code>method_n</code> are indeed methods or attributes of <code>Classname</code>. If they are methods shouldn't they be invoked as <code>instance.method_1().method_of_1().method_n()</code>.
  The reason I am asking this is because this syntax is frequently seen in e.g. Matplotlib, where you have <code>ax.yaxis.set_ticks()</code>. Does this last example mean that we are accessing an attribute of <code>ax</code> called <code>yaxis</code>, and then call a method <code>set_ticks()</code>. So the syntax implies: <code>classname.attribute.method</code>.
  How do you build such hierarchy? Can you direct me to the write place to read? I'd do it my self but don't know what exactly I am looking. I read about classes but haven't seen anything with two or more 'dots' e.g, <code>classname.attribute.method</code>.</p>