code: def __restrictIndex(self, i):
          
          if self.numRecords:
              rmax = self.numRecords - 1
              if abs(i) > rmax:
                  raise IndexError("Shape or Record index out of range.")
              if i < 0: i = range(self.numRecords)[i]
          return i
docs: Provides list-like handling of a record index with a clearer
          error message if the index is out of bounds.