Antoine Pitrou wrote: >> http://groups.google.com/group/sqlalchemy/browse_thread/thread/99812e0ca1f8cc7c# > > Another, not pretty, solution would be to use `exec` with a predefined > string containing the declarations...
Er, NO! > Yet another solution is something like: > locals.update((k, v) for (k, v) in cls.__dict__.items() > CommonColumns.update_locals(locals()) *cringe* > class CommonColumns(object): > def update_locals(cls): > locals = sys._getframe(1).f_locals > locals.update((k, v) for (k, v) in cls.__dict__.items() > if not k.startswith('_')) *feeling slightly sick now* :'( Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.