Re: [SQLObject] a third way of accessing attributes
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-05-15 15:58:44
|
On Thu, 2003-05-15 at 07:38, Bud P.Bruegger wrote: > * Adding methods and properties (attributes) to a class at runtime > (sans metaclasses). SQLObject does this in the class method SQLObject.addColumn. The metaclass simply searches _columns and the defined attributes to run addColumn on class creation. The metaclass does other things too, though I've tried to decrease its work as I'm able. Some things, like keeping some class variables from being inherited, still need to be done in the metaclass. The metaclass is really just the equivalent of __init__ for the class -- it handles the class instantiation, where the real __init__ (or __new__/_init) handle instance instantiation. Ian |