I wrote a a blog post about making multiple inequalities easier in AppEngine ... this is very sketchy, but illustrates what I was talking about.