Hello. There is a bug in these lines:

        if [key for key in attributes if not key
             in valid_attributes]:
            raise SyntaxError, 'invalid select attribute: %s' % key

At the moment of raise the 'key' variable holds last ispected value which is
not neccessarily incorrect.
The correct way will be something like:
offenders = [key for key in attributes if not key in valid_attributes]
if offenders: raise SyntaxError, 'invalid select attributes: %s'%((',
'.join(offenders)))

If same pattern was used elsewhere in the code then this bug is duplicated
in other places.

Regards
Alexey

Reply via email to