From deee101f7c34b5207faa68021544708b86296bdb Mon Sep 17 00:00:00 2001 From: Tim Vieira Date: Mon, 1 Jul 2013 01:09:29 -0400 Subject: [PATCH] updated documentation to use new repl `>` instead of `:-`. --- src/Dyna/Backend/Python/load/matrix.py | 8 ++++---- src/Dyna/Backend/Python/load/sexpr.py | 4 ++-- src/Dyna/Backend/Python/load/tsv.py | 4 ++-- src/Dyna/Backend/Python/repl.py | 28 +++++++++++++------------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Dyna/Backend/Python/load/matrix.py b/src/Dyna/Backend/Python/load/matrix.py index cdc20d5..6b334b9 100644 --- a/src/Dyna/Backend/Python/load/matrix.py +++ b/src/Dyna/Backend/Python/load/matrix.py @@ -11,8 +11,8 @@ class matrix(object): $ echo >> /tmp/foo $ echo 6 7 >> /tmp/foo - :- load m = matrix("/tmp/foo") - :- sol + > load m = matrix("/tmp/foo") + > sol Solution ======== @@ -31,8 +31,8 @@ class matrix(object): different type simple passing a function which will convert strings to the appropriate time (e.g. str, int, float). - :- load m = matrix("/tmp/foo", astype=str) - :- sol + > load m = matrix("/tmp/foo", astype=str) + > sol Solution ======== diff --git a/src/Dyna/Backend/Python/load/sexpr.py b/src/Dyna/Backend/Python/load/sexpr.py index 3b7b437..da7dd6f 100644 --- a/src/Dyna/Backend/Python/load/sexpr.py +++ b/src/Dyna/Backend/Python/load/sexpr.py @@ -8,8 +8,8 @@ class sexpr(object): $ echo '(a (b c) (d e)) (a b (c))' > /tmp/foo $ ./dyna - :- load trees = sexpr("/tmp/foo") - :- sol + > load trees = sexpr("/tmp/foo") + > sol Solution ======== diff --git a/src/Dyna/Backend/Python/load/tsv.py b/src/Dyna/Backend/Python/load/tsv.py index d5886a4..de52279 100644 --- a/src/Dyna/Backend/Python/load/tsv.py +++ b/src/Dyna/Backend/Python/load/tsv.py @@ -9,8 +9,8 @@ class tsv(object): """ Load tab-delimited files. - :- load row = tsv("test/repl/english.gr") - :- sol + > load row = tsv("test/repl/english.gr") + > sol row/4 ===== row(0,"0","S","NP VP") => true. diff --git a/src/Dyna/Backend/Python/repl.py b/src/Dyna/Backend/Python/repl.py index 2b47573..263dced 100644 --- a/src/Dyna/Backend/Python/repl.py +++ b/src/Dyna/Backend/Python/repl.py @@ -284,8 +284,8 @@ class REPL(cmd.Cmd, object): # # For example, # -# : subscribe f(X,X) -# :- f(1,1) := 1. f(1,2) := 2. f(2,2) := 3. +# > subscribe f(X,X) +# > f(1,1) := 1. f(1,2) := 2. f(2,2) := 3. # Changes # ======= # f(X,X): @@ -293,7 +293,7 @@ class REPL(cmd.Cmd, object): # # To view all subscriptions: # -# :- subscriptions +# > subscriptions # f(X): # 1 where {X=1} # 2 where {X=2} @@ -344,12 +344,12 @@ class REPL(cmd.Cmd, object): For more information about a particular loader type the following (in this case we get help for the `tsv` loader): - :- help load tsv + > help load tsv Examples: - :- load data = tsv("examples/data/data.csv", delim=',') - :- sol + > load data = tsv("examples/data/data.csv", delim=',') + > sol Solution ======== data/3 @@ -379,7 +379,7 @@ class REPL(cmd.Cmd, object): For more information about a particular post processor (in this case `save`) - :- help post save + > help post save """ try: @@ -396,21 +396,21 @@ class REPL(cmd.Cmd, object): We'll start with something very simple: - :- a :- b. - :- b :- c. - :- c. + > a :- b. + > b :- c. + > c. In our solution we see that `a` is true. - :- sol + > sol a => true. b => true. c => true. Now we want to find out why - :- trace a + > trace a a => true | @@ -459,7 +459,7 @@ class REPL(cmd.Cmd, object): The way trace lets you know that it has omitted something is with a message `item: shared structure see above` or `item: *cycle*`. - :- trace bar(10,10) + > trace bar(10,10) bar(10,10) => 220 | @@ -479,7 +479,7 @@ class REPL(cmd.Cmd, object): | └─ foo(10): shared structure see above - :- trace a + > trace a a => 2.0 | -- 2.50.1