expression parser: beautification

bzr revid: christophe@tinyerp.com-20080731120054-hmkxdh62drs6f2qm
This commit is contained in:
Christophe Simonis 2008-07-31 14:00:54 +02:00
parent 6010603de4
commit d98d6fe17b
1 changed files with 31 additions and 28 deletions

View File

@ -82,7 +82,10 @@ class expression( object ):
raise ValueError, 'Bad expression: %r' % (self.exp,)
def parse(self):
if not self._is_leaf( self.exp ) and self._is_expression( self.exp ):
if self._is_leaf(self.exp):
pass
elif self._is_expression(self.exp):
self.operator = self.exp[0]
for element in self.exp[1:]: