Skip to content

Operating with dictionaries in pyswip #141

@Losbarthos

Description

@Losbarthos

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}]

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)}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions