summaryrefslogtreecommitdiffstats
path: root/Demo/scripts/queens.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-10-11 14:27:51 (GMT)
committerGeorg Brandl <georg@python.org>2009-10-11 14:27:51 (GMT)
commitec8aab6e4c992d155ba389e5574842c43a323b0e (patch)
treee0deadc453a76933c7ddbc2867368644f9ec49b2 /Demo/scripts/queens.py
parent0e4a63993b4256b419ddb8d3d05cc29fccd15e62 (diff)
downloadcpython-ec8aab6e4c992d155ba389e5574842c43a323b0e.zip
cpython-ec8aab6e4c992d155ba389e5574842c43a323b0e.tar.gz
cpython-ec8aab6e4c992d155ba389e5574842c43a323b0e.tar.bz2
Merged revisions 75354 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75354 | georg.brandl | 2009-10-11 16:23:49 +0200 (So, 11 Okt 2009) | 1 line Update lpwatch script. ........
Diffstat (limited to 'Demo/scripts/queens.py')
-rwxr-xr-xDemo/scripts/queens.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/scripts/queens.py b/Demo/scripts/queens.py
index 820c9ad..726433c 100755
--- a/Demo/scripts/queens.py
+++ b/Demo/scripts/queens.py
@@ -19,8 +19,8 @@ class Queens:
def reset(self):
n = self.n
- self.y = [None]*n # Where is the queen in column x
- self.row = [0]*n # Is row[y] safe?
+ self.y = [None] * n # Where is the queen in column x
+ self.row = [0] * n # Is row[y] safe?
self.up = [0] * (2*n-1) # Is upward diagonal[x-y] safe?
self.down = [0] * (2*n-1) # Is downward diagonal[x+y] safe?
self.nfound = 0 # Instrumentation
@@ -50,7 +50,7 @@ class Queens:
self.up[x-y] = 0
self.down[x+y] = 0
- silent = 0 # If set, count solutions only
+ silent = 0 # If true, count solutions only
def display(self):
self.nfound = self.nfound + 1