Mercurial > hg > expressionparser
comparison expr.py @ 1:c45135ec8c13
slight cleanup
author | Ted Mielczarek <ted.mielczarek@gmail.com> |
---|---|
date | Wed, 01 Jun 2011 20:00:51 -0400 |
parents | ae57e69e4b15 |
children | 94a293b914af |
comparison
equal
deleted
inserted
replaced
0:ae57e69e4b15 | 1:c45135ec8c13 |
---|---|
195 self.assertTrue(self.parse("true || false", {})) | 195 self.assertTrue(self.parse("true || false", {})) |
196 self.assertFalse(self.parse("false || false", {})) | 196 self.assertFalse(self.parse("false || false", {})) |
197 self.assertFalse(self.parse("true && false", {})) | 197 self.assertFalse(self.parse("true && false", {})) |
198 | 198 |
199 if __name__ == '__main__': | 199 if __name__ == '__main__': |
200 | |
201 | |
202 | |
203 | |
204 unittest.main() | 200 unittest.main() |
205 | |
206 #parser = ExpressionParser(sys.argv[1], dict((a,int(b)) for a,b in (x.split('=') for x in sys.argv[2:]))) | |
207 #print "%s: %s" % (sys.argv[1],parser.parse()) |