Commits

Pierre Carbonnelle committed 04ac03a

properly cast answers to string in PY3

  • Participants
  • Parent commits 7a9438c
  • Tags 0.14.5

Comments (0)

Files changed (3)

File pyDatalog/examples/test.py

         (a_min3[Y] == min(Z, key=(-X,Z))) <= q(X, Y, Z)
         assert ask(a_min3[b]==Y) == set([(4,)]), "a_min3"
         
-        (a_min1[1] == min(Z, order_by=(Z))) <= q(X, Y, Z)
-        assert ask(a_min1[1]==Y) == set([(1,)])
+        (a_min1[1] == min(X, order_by=(Z))) <= q(X, Y, Z)
+        assert ask(a_min1[1]==Y) == set([('a',)])
         
     @pyDatalog.program()
     def max(): 

File pyDatalog/pyParser.py

             
     def __str__(self):
         return 'True' if self.answers is True \
-            else util.unicode_type(set(self.answers)).encode('utf-8') if self.answers is not True \
+            else util.cast_to_str(util.unicode_type(set(self.answers))) if self.answers is not True \
             else 'True'

File pyDatalog/version.py

-__version__ = "0.14.4"
+__version__ = "0.14.5"