konchunas / pyrs

Python to Rust transpiler
MIT License
523 stars 33 forks source link

sequence item 1: expected str instance, NoneType found, this time for a tuple #5

Closed db48x closed 5 years ago

db48x commented 5 years ago
File "/home/db48x/projects/pyrs/pyrs/clike.py", line 79, in visit_Return
  return 'return {0};'.format(self.visit(node.value))
File "/home/db48x/projects/pyrs/pyrs/clike.py", line 52, in visit
  return super(CLikeTranspiler, self).visit(node)
File "/usr/lib64/python3.7/ast.py", line 262, in visit
  return visitor(node)
File "/home/db48x/projects/pyrs/pyrs/transpiler.py", line 359, in visit_Tuple
  elts = ", ".join(elts)

Looks like the code is this line, so I don't know why the second element is None:

return (output, errcode[0] if len(errcode) > 0 else 0)