Closed richardthegit closed 6 hours ago
Well, an obvious work-around is to replace that blank string with a variable! 🤦♂️
Hello @richardthegit, nested quotes in f-strings are valid syntax in Python 3.12. python-minifer targets the running version of python. Is this broken in some other way I can't see?
I assume you installed python-minifier using a 3.12 interpreter. If you need the output to work on say, Python 3.11, you'll need to run python-minifier using the 3.11 interpreter.
Ahh - thanks for the quick reply @dflook - that's exactly what I was doing (compiling on 3.12, running on 3.11). I had no idea nested quotes were okay now! My bad.
Sorry to have troubled you, and thanks again for pyminify
. 😁
Closed.
There seems to be a issue introduced in 2.10.0 - the following code is broken after minify (no minify options specified on command line):
The last line is minified to:
def p(A,msg,style=END,bold=False):print(f"{A.BOLD if bold else""}{style}{msg}{A.END}",flush=True)
Note that the string contains nested double quotes. This doesn't happen when I minify on python-minifier.com, which is 2.9.0.
Many thanks for this awesome tool - any ideas on how to work-around this appreciated! 🫡