title: NameError: name 'self' is not defined, even though it is?
body: <p>Can anyone helps me understand why this is this giving me an error? The error being "NameError: name 'self' is not defined".  I have a similar class higher up in my code and that works fine? </p>
  
  <p>I'm using 'xlrd' and team is a reference to a workbook.sheet_by_name.</p>
  
  <pre><code>class Rollout:                                  
      def __init__(self, team, name):
          self.team = team
          self.name = name
          self.jobs = {}
          self.start_row = 1
          self.last_row = self.team.nrows
  
      for i in range(self.start_row,self.last_row):
              try:
                  self.jobs[i-1] =   [str(self.team.cell_value(i,0)).upper(), \
                                      str(self.team.cell_value(i,1)).upper(), \
                                      str(self.team.cell_value(i,2)).upper(), \
                                      str(self.team.cell_value(i,3)).upper(), \
                                      str(xlrd.xldate_as_tuple(self.team.cell_value(i,4),0)[3]), \
                                      str(self.team.cell_value(i,5)).upper(), \
                                      str(self.team.cell_value(i,6)).upper()]
              except ValueError:
                  print "It look's like one of your 'time' cells is incorrect!"
                  self.jobs[i-1] =   [str(self.team.cell_value(i,0)).upper(), \
                                      str(self.team.cell_value(i,1)).upper(), \
                                      str(self.team.cell_value(i,2)).upper(), \
                                      str(self.team.cell_value(i,3)).upper(), \
                                      "missing", \
                                      str(self.team.cell_value(i,5)).upper(), \
                                      str(self.team.cell_value(i,6)).upper()]
  </code></pre>