old_contents: class Cell(object):
  
      def __init__(self, pos):
          self.neighbors = 0
          self.neighbor_list = []
          self.pos = pos
          self.x = pos[0]
          self.y = pos[1]
  
  
      def add_neighbors(self):
          self.neighbor_list = []
  
          for i in xrange(self.x-1, self.x+1):
              for j in xrange(self.y-1, self.y+1):
                  self.neighbor_list.append((i,j))
  
          self.neighbor_list.remove(self.pos)
  
          return self.neighbor_list
  
  
  class Pattern(object):
  
      def __init__(self, name, pos):
          self.name = name
          self.pos = pos
          self.x = pos[0]
          self.y = pos[1]
  
  
      def create_pattern(self):
          from patterns import patterns
  
          pattern = patterns[self.name]
          coordinates = []
  
          for y in xrange(len(pattern)):
              for x in xrange(len(pattern[y])):
                  if pattern[y][x] == 1:
                      coordinates.append((self.x+x, self.y+y))
  
          return coordinates
  
new_contents: class Cell(object):
  
      def __init__(self, pos):
          self.neighbors = 0
          self.neighbor_list = []
          self.pos = pos
          self.x = pos[0]
          self.y = pos[1]
  
  
      def list_neighbors(self):
          self.neighbor_list = []
  
          for x in xrange(self.x-1, self.x+2):
              for y in xrange(self.y-1, self.y+2):
                  self.neighbor_list.append((x,y))
  
          self.neighbor_list.remove(self.pos)
  
          return self.neighbor_list
  
  
  class Pattern(object):
  
      def __init__(self, name, pos):
          self.name = name
          self.pos = pos
          self.x = pos[0]
          self.y = pos[1]
  
  
      def create_pattern(self):
          from patterns import patterns
  
          pattern = patterns[self.name]
          coordinates = []
  
          for y in xrange(len(pattern)):
              for x in xrange(len(pattern[y])):
                  if pattern[y][x] == 1:
                      coordinates.append((self.x+x, self.y+y))
  
          return coordinates
  
subject: change add_neighbors() to list_neighbors(); change i,j to x,y; change xrange stops to +2 instead of +1 (exclusive...duh)