pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

Don't assume a subscript for bare words if space before the [...] in a string

Open snoopyjc opened this issue 3 years ago • 1 comments

Don't assume a subscript for bare words if space before the [...] in a string. For example:

"Usage: $prog [options] <file>"

Generates this code:

f"Usage: {prog[options]}] <file>"

instead of this code:

f"Usage: {prog} [options] <file>"

snoopyjc avatar Dec 13 '21 21:12 snoopyjc

Fixed in https://github.com/snoopyjc/pythonizer

snoopyjc avatar Feb 07 '22 15:02 snoopyjc