Re: __getattr__ on non-instantiated class

2006-05-03 Thread Fredp
Well, actually I need only a tiny subset of a ORM. Or perhaps what I need isn't exactly an ORM, because I have only one kind of Object with a various number of Fields on a separate Table, so I was looking to create something that could fit this scheme and nothing more, but I see in any case it need

Re: __getattr__ on non-instantiated class

2006-05-03 Thread bruno at modulix
Fredp wrote: (snip) > I have something like a simple ORM which objects haven't a fixed number > of fields, and I need to have properties (or methods) for each of them, dumbiest possible example, but this should het you started class Field(object): # dummy def __init__(self, **kw): self._

Re: __getattr__ on non-instantiated class

2006-05-03 Thread bruno at modulix
Larry Bates wrote: > Fredp wrote: > >>Hi >>I was wondering if it is possible to have the various magic methods, >>mainly __getattr__ and __setattr__, and @property attributes called >>when accessing the attribute of a non-intantiated class. >> >>Imagin something like this: >># >>class MyClass:

Re: __getattr__ on non-instantiated class

2006-05-03 Thread Fredp
Larry Bates ha scritto: > Fredp wrote: > > Hi > > I was wondering if it is possible to have the various magic methods, > > mainly __getattr__ and __setattr__, and @property attributes called > > when accessing the attribute of a non-intantiated class. > > > > Imagin something like this: > > #

Re: __getattr__ on non-instantiated class

2006-05-03 Thread Larry Bates
Fredp wrote: > Hi > I was wondering if it is possible to have the various magic methods, > mainly __getattr__ and __setattr__, and @property attributes called > when accessing the attribute of a non-intantiated class. > > Imagin something like this: > # > class MyClass: > @property >

__getattr__ on non-instantiated class

2006-05-03 Thread Fredp
Hi I was wondering if it is possible to have the various magic methods, mainly __getattr__ and __setattr__, and @property attributes called when accessing the attribute of a non-intantiated class. Imagin something like this: # class MyClass: @property def prop(self): print