On Sun, 27 Feb 2005 20:20:19 +0200, Xif <[EMAIL PROTECTED]> wrote: > There are two major classes: > > 1) an Excel class, that represents of the whole Excel program > 2) a Cells class, that abstracts retrieval and editing of cells. > > [...] > > The difference between the 2 classes is that a Cells instance just > converts the generator into a list and returns it: > > #<code> > return list(getCells(self.sheet, cells)) > #</code> > > while an Excel instance returns the values of the cells: > > #<code> > return [cell.Value for cell in getCells(self.sheet, cells)] > #</code>
Why not have the Excel class make use of the Cells class? That is, you construct a Cells object with the appropriate parameters, use it to get the list of cells, and then iterate over that list getting values? You could probably find many other places in the Excel class where it could be simplified by delegating to a Cells instance, too... Jeff Shannon _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor