Mixed mode
ole-tange opened this issue · 1 comments
I want this to work:
#!/usr/bin/env bython
def a():
print("a")
def b() {
if 4<5:
print("b")
}
a()
b()
The situation here is: I get a Python script that I edit. Most of it is white-space indented correctly. But parts of it use braces.
In particular I need braces to paste-in a section. In the above I got the if
and print
statements from another source with different indention. So I simply wrapped it with {} and this should then be understood correctly.
So I am asking for a mixed mode, where indention matters if there are no braces overriding it.
This was a registered issue a while back too.
Since then, the python-to-bython translator has been improved quite a bit. You should now be able to convert the python code to bython, and then use only braces for block definitions. That would be a much cleaner solution than allowing the mix (which in my opinion would be an inconsistent and bad language design)