Skip to content

Commit 1cf30a1

Browse files
author
hartsantler
committed
fixed typed int used in while or if while i<n:
1 parent 8073bd2 commit 1cf30a1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pythonjs/python_to_pythonjs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,8 +1332,7 @@ def visit_Compare(self, node):
13321332
left = self.visit(node.left)
13331333
comp = [ left ]
13341334
for i in range( len(node.ops) ):
1335-
if i==0 and isinstance(node.left, ast.Name) and node.left.id in self._typedef_vars:
1336-
#raise RuntimeError(node)
1335+
if i==0 and isinstance(node.left, ast.Name) and node.left.id in self._typedef_vars and self._typedef_vars[node.left.id] == 'long':
13371336
if isinstance(node.ops[i], ast.Eq):
13381337
comp = ['%s.equals(%s)' %(left, self.visit(node.comparators[i]))]
13391338
elif isinstance(node.ops[i], ast.Lt):

0 commit comments

Comments
 (0)