Can someone explain the last line of this Python code snippet to me?
Cell is just another class. I don\'t understand how the for loop is be
Cell
for
It is the same as if you did this:
def __init__(self, region, srcPos, pos): self.region = region self.cells = [] for i in xrange(region.cellsPerCol): self.cells.append(Cell(self, i))
This is called a list comprehension.