java2python icon indicating copy to clipboard operation
java2python copied to clipboard

empty blocks with comments

Open yucer opened this issue 8 years ago • 0 comments

Here is another case. Is there anyway we can help to fix them ?

if (a > 1)
{
  # comment from java code (maybe a todo)
}
else
{
   result = 4
}

becomes in Python:

if a > 1:
  # comment from java code (maybe a todo)
else
   result = 4

That construction is not valid in Python, it needs at less a pass sentence besides the comments. This way:

if a > 1:
  # comment from java code (maybe a todo)
  pass
else
  result = 4

yucer avatar Sep 27 '16 12:09 yucer