Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bython modifies braces within strings. #30

Open
stormfish-sci opened this issue Mar 5, 2019 · 4 comments
Open

Bython modifies braces within strings. #30

stormfish-sci opened this issue Mar 5, 2019 · 4 comments

Comments

@stormfish-sci
Copy link

Bython v0.8 exhibits a problem in which it modifies braces within single and double quotation strings.

Code to reproduce:

test.by:
print('Hello, world! I have braces {} here.');
print("Hello, world! I have braces {} here, too.");

The output produced is:
Hello, world! I have braces:here.
Hello, world! I have braces:here, too.

The expected output is, of course:
Hello, world! I have braces {} here.
Hello, world! I have braces {} here, too.

Thanks!

@lqforgithub
Copy link

From the issue I can tell no good grammar tree is build for braces analysis, it's no good to rely on the project.

@kkevlar
Copy link

kkevlar commented Mar 2, 2021

+1

@xXCrash2BomberXx
Copy link

Old issue but I wrote this and maybe it will work better for you, if you still want it
Bython

@MZH-Amr
Copy link

MZH-Amr commented Apr 5, 2024

++

(i.e +1)
It happens when using f-strings which makes using them impossible, also it raises an error when inside functions

def example_fn(param) {
    print(f"text from function, {param}")
}

Raises this error:

  File "/home/mzh/python_file.py", line 4
    print(f"text from function,:param")
    ^
IndentationError: expected an indented block after function definition on line 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants