pytholite: fix bug with constant assignment to register

This commit is contained in:
Sebastien Bourdeauducq 2012-12-19 16:21:57 +01:00
parent 9c65402fda
commit 47f5fc70e4
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class _Compiler:
return self.visit_assign_special(sa, node, statements) return self.visit_assign_special(sa, node, statements)
else: else:
value = self.ec.visit_expr(node.value) value = self.ec.visit_expr(node.value)
if isinstance(value, Value): if isinstance(value, (int, bool, Value)):
r = [] r = []
for target in node.targets: for target in node.targets:
if isinstance(target, ast.Attribute) and target.attr == "store": if isinstance(target, ast.Attribute) and target.attr == "store":