bython icon indicating copy to clipboard operation
bython copied to clipboard

by2py Bug: Removes every colon

Open kkevlar opened this issue 5 years ago • 3 comments

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).

kkevlar avatar Mar 02 '21 20:03 kkevlar

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.

spannercodes avatar Jul 06 '21 18:07 spannercodes

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?

emmatebibyte avatar Mar 01 '22 19:03 emmatebibyte

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

xXCrash2BomberXx avatar Aug 06 '22 00:08 xXCrash2BomberXx