Skip to content

Commit

Permalink
Increment version to 1.3.4
Browse files Browse the repository at this point in the history
Also fixed the docstring for FactBase.asp_str()
  • Loading branch information
daveraja committed Oct 26, 2021
1 parent 927249e commit e46c50a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion clorm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .orm import *

__version__ = "1.3.3"
__version__ = "1.3.4"
__author__ = "David Rajaratnam"
__email__ = "[email protected]"
__copyright__ = "Copyright (c) 2018 David Rajaratnam"
Expand Down
25 changes: 12 additions & 13 deletions clorm/orm/factbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ def facts(self):
def asp_str(self,*,width=0,commented=False,sorted=False):
"""Return a ASP string representation of the fact base.
This ASP string representation is syntactically correct ASP code so is
suitable for adding as the input to to an ASP program (or writing to a
file for later use in an ASP program).
The generated ASP string representation is syntactically correct ASP
code so is suitable for adding as the input to to an ASP program (or
writing to a file for later use in an ASP program).
By default the order of the facts in the string is arbitrary. Because
`FactBase` is built on a `OrderedDict` (which preserves insertion
Expand All @@ -377,16 +377,15 @@ def asp_str(self,*,width=0,commented=False,sorted=False):
string. In order to guarantee the same output the `sorted` flag can be
specified.
Args (keyword arguments only):
width=0: tries to fill to a given width by putting more than one
fact on a line if necessary.
commented=False: produces commented ASP code by adding a predicate
signature and turning the Predicate sub-class
docstring into a ASP comments.
sorted=False: sort the output facts
Args:
width: tries to fill to a given width by putting more than one
fact on a line if necessary (default: 0).
commented: produces commented ASP code by adding a predicate
signature and turning the Predicate sub-class docstring
into a ASP comments (default: False).
sorted: sort the output facts, first by predicates (name,arity) and
then by the natural order of the instances for that
predicate (default :False).
"""
self._check_init() # Check for delayed init
Expand Down

0 comments on commit e46c50a

Please sign in to comment.