Did you know ... | Search Documentation: |
Janus iterator query |
Class janus.query() is similar to the janus.query_once() function, but it returns a Python iterator that allows for iterating over the answers to a non-deterministic Prolog predicate.
The iterator also implements the Python context manaager protocol
(for the Python with
statement).
truth
False
.
See discussion above.
keep
is a SWI-Prolog extension.|
None janus.query.next()query
as an iterator is to be preferred. See discussion
above. q.next()
is equivalent to next(q)
except it returns None
if there are no more values instead
of raising the StopIteration
exception.with
statement), which closes the
query when the query goes out of scope or when an error happens.