[sqlalchemy] @compiles ignores inheritance

2010-03-30 Thread Tobias
Hi, I am having a bunch of classes that inherit from Function and all of them should be compiled by a method annotated with @compiles. class __base_function(Function): def __init__(self, clause, *clauses, **kw): self.clause = clause Function.__init__(self,

Re: [sqlalchemy] @compiles ignores inheritance

2010-03-30 Thread Michael Bayer
Tobias wrote: Hi, So I thought I could write just one method, that is annotated with @compiles(__base_function), but this does not work. I have to write a method for each class that inherits from __base_function: @compiles(wkt) def compile_wkt(element, compiler, **kw): return