Skip to content

Commit

Permalink
close #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Aluriak committed May 29, 2019
1 parent d1e3e1e commit 06c69b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ the official module can be used by clyngor if it is available.

- 0.4.0 (todo)
- see [further ideas](#Further-ideas)
- 0.3.19
- fix #16
- 0.3.18
- TermSet bugfix
- `TermSet.add` to add atoms to the TermSet
Expand Down
2 changes: 1 addition & 1 deletion clyngor/as_pyasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __hash__(self):

def __str__(self):
if self.nb_args() > 0:
return '{}({})'.format(self.predicate, ','.join(self.arguments))
return '{}({})'.format(self.predicate, ','.join(map(str, self.arguments)))
else:
return self.predicate
def __repr__(self): return str(self)
Expand Down
6 changes: 6 additions & 0 deletions clyngor/test/test_answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ def test_as_pyasp_atom():
answers = Answers(('a("b","d")',)).as_pyasp
for atom in next(answers):
assert atom == Atom(predicate='a', args=('"b"','"d"'))
print(atom)
answers = Answers(('a(1,"2.3")',)).as_pyasp
for atom in next(answers):
assert atom == Atom(predicate='a', args=(1,'"2.3"'))
print(atom)



def test_as_pyasp_termset_frozenset():
Expand Down

0 comments on commit 06c69b3

Please sign in to comment.