softpano / pythonizer

Translator (or more correctly transcriber) from Perl to Python
http://www.softpanorama.org/Scripting/Pythonorama/Python_for_perl_programmers/Pythonizer/index.shtml
Other
39 stars 17 forks source link

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

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

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 commented 2 years ago

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