# HG changeset patch # User Paul Boddie # Date 1192394688 -7200 # Node ID 9ca88b131c7e3cd8df0501d98d92534a89b4f9cf # Parent f5d0e407d3893527ddaacb6d09f96faeacdd5046 Reformatted somewhat. diff -r f5d0e407d389 -r 9ca88b131c7e simplify/simplified/program.py --- a/simplify/simplified/program.py Sat Sep 22 19:05:30 2007 +0200 +++ b/simplify/simplified/program.py Sun Oct 14 22:44:48 2007 +0200 @@ -65,11 +65,17 @@ choices Any choices which may be included in the final program. """ - common_attributes = "name", "index", "value", "nstype", "internal", "returns_value", "is_method", "ref", "module", "structures", "original" + common_attributes = ("name", "index", "value", "nstype", "internal", + "returns_value", "is_method", "ref", "module", "structures", "original") + expression_attributes = "expr", "lvalue", "test" + argument_attributes = "star", "dstar" + invocation_attributes = "params", # not "args" - see "pos_args", "kw_args" - grouping_attributes = "code", "body", "else_", "handler", "finally_", "choices", "nodes" + + grouping_attributes = ("code", "body", "else_", "handler", "finally_", + "choices", "nodes") def __init__(self, original=None, defining=0, **kw): @@ -199,7 +205,9 @@ if hasattr(self, "accesses"): self._pprint(indent, "", "--------", stream=stream) for ref, attributes in self.accesses.items(): - self._pprint(indent + 2, "| ", "when %s: %s" % (ref, ", ".join([("%s via %s" % attr_acc) for attr_acc in attributes])), stream=stream) + self._pprint(indent + 2, "| ", "when %s: %s" % (ref, + ", ".join([("%s via %s" % attr_acc) for attr_acc in attributes]) + ), stream=stream) self._pprint(indent, "", "--------", stream=stream) if hasattr(self, "writes"): self._pprint(indent, "", "--------", stream=stream)