#NEWLINE# def query( cls , query , maxresult = ( - 1 ) , catcherrors = True , normalize = True ) : #NEWLINE# #INDENT# 'Run a prolog query and return a generator.\n        If the query is a yes/no question, returns {} for yes, and nothing for no.\n        Otherwise returns a generator of dicts with variables as keys.\n\n        >>> prolog = Prolog()\n        >>> prolog.assertz("father(michael,john)")\n        >>> prolog.assertz("father(michael,gina)")\n        >>> bool(list(prolog.query("father(michael,john)")))\n        True\n        >>> bool(list(prolog.query("father(michael,olivia)")))\n        False\n        >>> print sorted(prolog.query("father(michael,X)"))\n        [{\'X\': \'gina\'}, {\'X\': \'john\'}]\n        ' #NEWLINE# return cls . _QueryWrapper ( ) ( query , maxresult , catcherrors , catcherrors )