title: Why the output is returning none type
body: <p>Below is the code. the main() test is suppose to return greatest common divisor but it is returning None type. Not understanding the return calls issue in gcd</p>
  
  <pre><code>class Fraction:
      def __init__(self, x, y):
          self._x = x
          self._y = y
  
      def gcd(self):
          p = self._gcd(self._x, self._y)
          return p
  
      def _gcd(self, x, y):
          if (x % y == 0):
              return y
          else:
               _gcd(y, x%y)
  
  
  def main():
      f = Fraction(6,4)
      return f.gcd()
  if __name__ == '__main__':
      print (main()) 
  </code></pre>