i really apologize for asking again, but i cannot make it work.
i need it to be a drop-in-replacement, so i dont have to go to each place and adapt the expression.
what i have right now is:

@classmethod
    def select(cls, clause=None, **kw):
        sresult = SQLObject.select(cls, clause, **kw)
        return sresult.filter(~ LIKE(Reisen.q.REISENR, "BUS%"))

but no matter what i try, it always produces errors.

Can you help me once more?

Thanks





On Jan 17, 2008 6:02 PM, Oleg Broytmann <phd@phd.pp.ru> wrote:
On Thu, Jan 17, 2008 at 05:44:03PM +0100, Frank Wagner wrote:
> really sorry to ask once more. when i now try using this, i get:
> TypeError: select() takes exactly 1 argument (2 given)
>
> you know why?

  The problem, I think, is in the declaration

> >    def select(cls, **kw):

  Now Python expects you pass a lot of keywords to .select(), when you
probably only pass "clause" without naming it. See the declaration of
.select() in main.py:

   def select(cls, clause=None, clauseTables=None,
              orderBy=NoDefault, limit=None,
              lazyColumns=False, reversed=False,
              distinct=False, connection=None,
              join=None, forUpdate=False):

  Either you call your .select() as Reisen.select(clause=...) or
redeclare it as

  def select(cls, clause=None, **kw):

  Don't forget to pass the clause to SQLObject.select().

Oleg.
--
    Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
          Programmers don't die, they just GOSUB without RETURN.