[pypy-svn] r29011 - pypy/dist/pypy/doc

hpk at codespeak.net hpk at codespeak.net
Tue Jun 20 17:25:23 CEST 2006


Author: hpk
Date: Tue Jun 20 17:25:22 2006
New Revision: 29011

Modified:
   pypy/dist/pypy/doc/howto-logicobjspace-0.9.txt
Log:
fix ReST issues


Modified: pypy/dist/pypy/doc/howto-logicobjspace-0.9.txt
==============================================================================
--- pypy/dist/pypy/doc/howto-logicobjspace-0.9.txt	(original)
+++ pypy/dist/pypy/doc/howto-logicobjspace-0.9.txt	Tue Jun 20 17:25:22 2006
@@ -347,20 +347,20 @@
 implementor to drive the search. First, let us see some code driving a
 binary depth-first search::
 
-1   def first_solution_dfs(space):
-2       status = space.ask()
-3       if status == 0:
-4           return None
-5       elif status == 1:
-6           return space
-7       else:
-8           new_space = space.clone()
-9           space.commit(1)
-10          outcome = first_solution_dfs(space)
-11          if outcome is None:
-13              new_space.commit(2)
-14              outcome = first_solution_dfs(new_space)
-15          return outcome
+    1   def first_solution_dfs(space):
+    2       status = space.ask()
+    3       if status == 0:
+    4           return None
+    5       elif status == 1:
+    6           return space
+    7       else:
+    8           new_space = space.clone()
+    9           space.commit(1)
+    10          outcome = first_solution_dfs(space)
+    11          if outcome is None:
+    13              new_space.commit(2)
+    14              outcome = first_solution_dfs(new_space)
+    15          return outcome
 
 This recursive solver takes a space as argument, and returns the first
 space containing a solution or None. Let us examine it piece by piece
@@ -375,7 +375,7 @@
 value, which means that all (possibly concurrent) computations of the
 space are terminated.
 
-At this point, either::
+At this point, either:
 
 * the space is failed (status == 0), which means that there is no set
   of values of the finite domains that can satisfy the constraints,
@@ -420,7 +420,7 @@
 solving is typically using binary search, so there is a default,
 binary distributor set up in any new space.
 
-Here are two examples of distribution strategies::
+Here are two examples of distribution strategies:
 
 * take the variable with the biggest domain, and remove exactly one
   value from its domain,



More information about the Pypy-commit mailing list