title: Python subtracting floats
body: <p>I have the following code embeded in a class.Whenever I run distToPoint it gives the error 'unsupported operand type(s) for -: 'NoneType' and 'float'' I don't know why it's returning with NoneType and how do I get the subtraction to work?</p>
  
  <p>Both self and p are supposed to be pairs.</p>
  
  <pre><code>def __init__(self, x, y):
      self.x = float(x)
      self.y = float(y)
  def distToPoint(self,p):
      self.ax = self.x - p.x
      self.ay = self.y - p.y
      self.ac = math.sqrt(pow(self.ax,2)+pow(self.ay,2)) 
  </code></pre>