pyminifier
pyminifier copied to clipboard
Does not support Python 3.6 f'{string}'
The minifier does not support python 3.6 f-string.
Sample.py
name : str = 'Chuma'
print(f'Hello {name}!')
Minified.py
k=str
t=print
u:k='Chuma'
t(f'Hello {name}!')
It doesn't change the variable name within the f-string causing a NameError whenever executed.
I also does not support '{hi}'.format(hi=hello)
I use f-strings a lot (because .format() so sooooo ugly). Is this issue on the radar for a fix anytime soon?
I'm guessing not since the last commit was 26-Jun-2015 :(
This issue has "fixed itself" as of Python 3.12 thanks to changes to how the tokenizer treats f-strings. For more information, see https://peps.python.org/pep-0701/.