changeset 107:12f0d470f970

Simplify isinstance calls.
author Martin Geisler <mg@lazybytes.net>
date Fri, 17 Jul 2009 11:52:36 +0200
parents ee8991b037b9
children 9f212bdf4c5d
files pysmcl/secret_ifs.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/secret_ifs.py	Fri Jul 17 11:49:56 2009 +0200
+++ b/pysmcl/secret_ifs.py	Fri Jul 17 11:52:36 2009 +0200
@@ -33,8 +33,7 @@
 
 def only_assignments(body):
     for i in body:
-        if not (isinstance(i, ast.Assign) or
-                isinstance(i, ast.Pass)):
+        if not isinstance(i, (ast.Assign, ast.Pass)):
             error("Error, "
                   "inside secret if statements, we only allow "
                   "assignments, but found a %s." % type(i), i)