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

by2py Bug: Removes every colon #37

Open
kkevlar opened this issue Mar 2, 2021 · 3 comments
Open

by2py Bug: Removes every colon #37

kkevlar opened this issue Mar 2, 2021 · 3 comments

Comments

@kkevlar
Copy link

kkevlar commented Mar 2, 2021

Here's a python snippet:

print("Hello World: !")

Running py2by on this snippet results in:

print("Hello World !")

The documentation explains that py2by is experimental- but I'd like to report this bug. Maybe there's an easy fix?

I discovered this bug when py2by-ing a souce file with type annotations (they break).

@spannercodes
Copy link

Perhaps by only removing colons followed by a \n or \r\n? But that doesn't do anything to stop multi-line strings like

""" This is:
a multi-line string """

I imagine it would be a lot more complicated to find a fix for those cases, though they will be less frequent.

@emmatebibyte
Copy link

Perhaps by only removing colons followed by a \n or \r\n? But that doesn't do anything to stop multi-line strings like

""" This is:
a multi-line string """

I imagine it would be a lot more complicated to find a fix for those cases, though they will be less frequent.

Why not simply stop deleting colons when it runs into a string and restart when the string is over?

@xXCrash2BomberXx
Copy link

Maybe my build would work better, assuming you still want to find one that may work
My Build of Bython

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

4 participants