Commits

Pierre Carbonnelle committed 9ebcc67

can assert fact for prefixed predicates, after all

  • Participants
  • Parent commits 265c908

Comments (0)

Files changed (2)

File pyDatalog/examples/test.py

     assert_error('(two(X)==Z) <= (Z==X+(lambda X: X))', 'Syntax error near equality: consider using brackets. two\(X\)')
     assert_error('p(X) <= sum(X, key=X)', 'Invalid body for clause')
     assert_error("p(X) <= (X=={})", "unhashable type: 'dict'")
-    assert_error("+ Z.d(a, 'b')", "Cannot assert a fact for a prefixed predicate")
 
     """ SQL Alchemy                    """
 

File pyDatalog/pyParser.py

         " unary + means insert into database as fact "
         if self._variables():
             raise util.DatalogError("Cannot assert a fact containing Variables", None, None)
-        if '.' in self.predicate_name:
-            raise util.DatalogError("Cannot assert a fact for a prefixed predicate", None, None)
         clause = pyEngine.Clause(self.lua, [])
         pyEngine.assert_(clause)