title: Execute 3 attribute class python
body: <p>Here's my code</p>
  
  <pre><code>class Word:
  
      def motivation(self):
         return 'Dont Give up'
      def __call__(self, x):
         return 'love'
      def __call__(self, c):
         return 'hate'
      def dude(self):
         return 'dude'
      def brother(self):
         return 'brother'
  
  word = Word()
  </code></pre>
  
  <p>with this code i must produce like this</p>
  
  <pre><code>&gt;&gt;&gt; word.motivation.dude
  'Dont Give Up Dude'
  </code></pre>
  
  <p>And must be like this too</p>
  
  <pre><code>&gt;&gt;&gt; word.motivation.brother
  'Dont Give Up Brother'
  </code></pre>
  
  <p>if i execute with this script, the output get error</p>
  
  <pre><code>AttributeError: 'Function' object has no attribute 'dude'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>AttributeError: 'Function' object has no attribute 'brother'
  </code></pre>