title: Python: 'function' object has no attribute x
body: <p>Hello I'm having an issue calling a function on an object in Python.
  This is the Method im trying to call</p>
  
  <pre><code>def getCenter(self):
      cx = 0
      cy = 0
      for p in self.points:
          cx += p.x
          cy += p.y
      cx /= len(self.points)
      cy /= len(self.points)
      return Point(cx,cy,self.cid)
  </code></pre>
  
  <p>this is the call im trying to make</p>
  
  <pre><code>for c in clusters:
      print(c.points,c.cid)
      poi = c.getCenter
      print(poi.x)
  </code></pre>
  
  <p>clusters have a list of points called "points". A point looks like this</p>
  
  <pre><code>class Point:
      x = 0
      y = 0
      cluster = -1
      def __init__(self, x = 0, y = 0):
          self.x = x
          self.y = y
  </code></pre>
  
  <p>I'm getting the error message 'function' object has no attribute 'x'. I'm calling the getCenter-method on a Cluster which returns a point. And im calling the x attribut on that point. So i dont know why this error is appearing</p>