Mercurial > pysmcl
changeset 201:934936266ad6
secret_if: spell fix
author | Sigurd Meldgaard <stm@daimi.au.dk> |
---|---|
date | Wed, 16 Dec 2009 17:43:49 +0100 |
parents | fe75a99b7b0e |
children | 544c4eb0a3a2 |
files | pysmcl/secret_ifs.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/pysmcl/secret_ifs.py Wed Dec 16 17:35:57 2009 +0100 +++ b/pysmcl/secret_ifs.py Wed Dec 16 17:43:49 2009 +0100 @@ -33,12 +33,12 @@ return visitor.assigned -def is_syntetic(statement): +def is_synthetic(statement): """Temporary values are not used later, so they do not have to be computed in both paths of a sourounding if. Therefore we set a - .syntetic flag, it can be checked with this function""" + .synthetic flag, it can be checked with this function""" try: - return statement.syntetic + return statement.synthetic except AttributeError: return False @@ -85,9 +85,9 @@ repl = {} for stm in body: if isinstance(stm, ast.Assign): - if not is_syntetic(stm): + if not is_synthetic(stm): new_name = self.make_name(stm.targets[0].id + suffix) - stm.syntetic = True + stm.synthetic = True repl[stm.targets[0].id] = new_name stm.targets[0].id = new_name for v in ast.walk(stm): @@ -130,7 +130,7 @@ cond_comp = loc(ast.Assign(targets = [cond_store], value = node.test)) - cond_comp.syntetic = True + cond_comp.synthetic = True replacement.append(cond_comp) @@ -153,8 +153,8 @@ left = v1, right = right_hand)))) - # combine.syntetic = False the combination of the two - # branches is not syntetic, because it replaces the + # combine.synthetic = False the combination of the two + # branches is not synthetic, because it replaces the # real assignments replacement.append(combine)