Diff of /doc/source/using_pyke.txt [9ac085] .. [0176eb] Maximize Restore

  Switch to side-by-side view

--- a/doc/source/using_pyke.txt
+++ b/doc/source/using_pyke.txt
@@ -246,7 +246,7 @@
     >>> my_engine.prove_1('bc_example', 'father_son', ('thomas', 'bogus'), 1)
     Traceback (most recent call last):
         ...
-    CanNotProve: Can not prove bc_example.father_son(thomas, bogus, $ans_0)
+    pyke.knowledge_engine.CanNotProve: Can not prove bc_example.father_son(thomas, bogus, $ans_0)
 
 *some_engine*.prove_n(kb_name, entity_name, fixed_args, num_returns)
     This returns a context manager for a generator yielding 2-tuples, a tuple
@@ -257,7 +257,7 @@
     >>> from __future__ import with_statement
     >>> with my_engine.prove_n('bc_example', 'father_son', ('thomas',), 2) as gen:
     ...     for ans in gen:
-    ...         print ans
+    ...         print(ans)
     (('bruce', ()), None)
     (('david', ('grand',)), None)
 
@@ -271,14 +271,10 @@
 goal.
 
 You may call the plan function any number of times.  You may even pickle
-the plan for later use.  But the plans are constructed out of
-`functools.partial`_ functions, so you need to register this with copy_reg_
-before pickling the plan:
-
-    >>> import copy_reg
-    >>> import functools
-    >>> copy_reg.pickle(functools.partial,
-    ...                 lambda p: (functools.partial, (p.func,) + p.args))
+the plan for later use.  The plans are constructed out of
+`functools.partial`_ functions, which had to be registered with copyreg_
+before you could pickle them in older Python releases.  But in Python3 it is
+no longer necessary to register functools.partial to be able to pickle them.
 
 No special code is required to unpickle a plan.  Just unpickle and call it.
 (Unpickling the plan only imports one small Pyke module to be able to run
@@ -331,18 +327,14 @@
     ... except:
     ...     krb_traceback.print_exc(None, sys.stdout)   # sys.stdout needed for doctest
     Traceback (most recent call last):
-      File "<doctest using_pyke.txt[37]>", line 2, in <module>
+      File "<doctest using_pyke.txt[34]>", line 2, in <module>
         my_engine.prove_1('error_test', 'goal', (), 0)
-      File "...knowledge_engine.py", line 288, in prove_1
-        return iter(it).next()
-      File "...knowledge_engine.py", line 272, in gen
+      File "...knowledge_engine.py", line 289, in prove_1
+        return next(iter(it))
+      File "...knowledge_engine.py", line 273, in gen
         for plan in it:
-      File "...rule_base.py", line 46, in next
-        return self.iterator.next()
-      File "...knowledge_engine.py", line 40, in from_iterable
-        for x in iterable: yield x
-      File "...knowledge_engine.py", line 40, in from_iterable
-        for x in iterable: yield x
+      File "...rule_base.py", line 46, in __next__
+        return next(self.iterator)
       File "...error_test.krb", line 26, in rule1
         goal2()
       File "...error_test.krb", line 31, in rule2