title: Returning an instance of a class giving error
body: <p>The following code doesn't seem to work
  The print statement is erroring out AttributeError: 'NoneType' object has no attribute 'week_num'</p>
  
  <p>I'm attempting to add weeks to year-week input</p>
  
  <pre><code>class Week:
      def __init__(self, year, week_num):
          self.year = year
          self.week_num = week_num
  
      def isLeapYear (self, year) :
          if (year % 4) == 0: 
              if (year % 100) == 0: 
                  if (year % 400) == 0: 
                      return True
                  else: 
                      return False
              else: 
                  return True
          else: 
              return False
  
      def maxWeeks (self, year) :
          if self.isLeapYear(year):
              return 53 
          else:
              return 52
  
      def plus (self, num) :
          def iter(week_num, year):
              max_week = self.maxWeeks(year)
              if(week_num &gt; max_week) :
                  return iter(week_num - max_week, year + 1)
              else :
                  print(year, week_num)
                  return Week(year, week_num)
  
          iter(self.week_num + num, self.year)
  
  
  a = Week(2020, 8)
  b = a.plus(13)
  print(b.week_num, b.year)
  </code></pre>