Open Losbarthos opened 2 years ago
Based on this introduction about dictionaries, I just tried the following statement:
from prolog import * pl = Prolog() #pl.consult("logic.pl") print(list(pl.query("X = point{x:1,y:2}.C.")))
expected output: [{'X': 1, 'C': x}, {'X': 2, 'C': y}]
[{'X': 1, 'C': x}, {'X': 2, 'C': y}]
actual output: [{'X': ".(Atom('26501')(point, 1, x, 2, y), _3198)", 'C': Variable(101)}, {'X': ".(Atom('26501')(point, 1, x, 2, y), _3198)", 'C': Variable(80)}]
[{'X': ".(Atom('26501')(point, 1, x, 2, y), _3198)", 'C': Variable(101)}, {'X': ".(Atom('26501')(point, 1, x, 2, y), _3198)", 'C': Variable(80)}]
Based on this introduction about dictionaries, I just tried the following statement:
expected output:
[{'X': 1, 'C': x}, {'X': 2, 'C': y}]
actual output:
[{'X': ".(Atom('26501')(point, 1, x, 2, y), _3198)", 'C': Variable(101)}, {'X': ".(Atom('26501')(point, 1, x, 2, y), _3198)", 'C': Variable(80)}]