def error_query(msg, q=None):
 if (q is None):
  q = _NullQuery()
 q.error = msg
 return q

def error_query ( msg , q = None ) : if ( q is None ) : q = _NullQuery ( ) q . error = msg return q
returns the query in the second argument with its error attribute set to msg .