> > > It's very clean, it makes a lot of logical sense, and it feels a bit > more Pythonic (to me, at least) than the current methods and the other > proposals. > > +1 to this over anything else that's been suggested.
Its pretty orthogonal to most of the other suggestions. However, I think using a descriptor it is possible to make the "object manager" work in the way that people seem to want - allowing access via the class, but not via the instance ( seperation of table wide and instance-specific functionality.) class ObjectManager(object): def __get__(self, instance, type=None): if instance != None: raise AttributeError, "Can not access object manager via an instance" return self