Open MewX opened 6 years ago
Hi, I just found there's a probability when I use single-character variable.
So, I have codes like this:
... IDINFO_JSON = "idinfo.json" ... def main(): if not os.path.exists(IDINFO_JSON): sys.exit(-1) ... r = requests.post(...) ... ...
After pyminifier -O, it potentially becomes this code:
pyminifier -O
... r="idinfo.json" ... def main(): if not os.path.exists(r): G(-1) ... r = i(...) ... ...
And because of the variable scope issue, when i run the codes, it meets an error:
UnboundLocalError: local variable 'r' referenced before assignment
Hi, I just found there's a probability when I use single-character variable.
So, I have codes like this:
After
pyminifier -O
, it potentially becomes this code:And because of the variable scope issue, when i run the codes, it meets an error: