Remove all print statements from the Copycat library.

Convert the most important one to logging; kill the rest.
This commit is contained in:
Arthur O'Dwyer
2017-04-18 20:55:56 -07:00
parent 65124fa45d
commit 9f8bc8e66e
4 changed files with 30 additions and 22 deletions

View File

@ -98,15 +98,10 @@ class Workspace(object):
"""A list of all objects in the workspace with >= 1 open bond slots"""
objects = [o for o in self.objects
if o.string == self.initial or o.string == self.target]
#print 'A: %d' % len(objects)
objects = [o for o in objects if not o.spansString()]
#print 'B: %d' % len(objects)
objects = [o for o in objects
if (not o.leftBond and not o.leftmost) or
(not o.rightBond and not o.rightmost)]
#print 'C: %d' % len(objects)
#objects = [ o for o in objects if ]
#print 'D: %d' % len(objects)
return len(objects)
def numberOfUngroupedObjects(self):
@ -118,14 +113,14 @@ class Workspace(object):
return len(objects)
def numberOfUnreplacedObjects(self):
"""A list of all unreplaced objects in the inital string"""
"""A list of all unreplaced objects in the initial string"""
objects = [o for o in self.objects
if o.string == self.initial and isinstance(o, Letter)]
objects = [o for o in objects if not o.replacement]
return len(objects)
def numberOfUncorrespondingObjects(self):
"""A list of all uncorresponded objects in the inital string"""
"""A list of all uncorresponded objects in the initial string"""
objects = [o for o in self.objects
if o.string == self.initial or o.string == self.target]
objects = [o for o in objects if not o.correspondence]