Introduce FileShapeStore
Bernhard Herzog
bh at intevation.de
Mon Mar 14 21:11:33 CET 2005
Jan-Oliver Wagner <jan at intevation.de> writes:
> +class FileShapeStore:
> +
> + def layerName(self):
Why is this not spelled LayerName or layer_name? LayerName would be
consistent with the other public methods. If we want to start with the
lower-case names we should prefer lower_case_with underscore over
mixedCase because that's what Python's PEP 8 suggests as well and
because I like it better, too :)
> + def setTable(self, table):
> + """Set the table containing the attribute data."""
> + self._table = table
> +
> + def Table(self):
> + """Return the table containing the attribute data."""
> + return self._table
I don't think these should be in the base class. They are suitable for
the ShapefileStore and currently also the OGRShapeStore, but for the
PostGISShapeStore these implementations would be useless. A
PostGISShapeStore is its own table so the Table method simply returns
self. The OGRShapeStore would be better off using the same design, I
think, leaving only the ShapefileStore with a distinct table object.
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)