You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flow graph optimizer has more information and can do better job.
The problem is that we need to convert from UNARY_OP(-, CONST(1)) to CONST(-1), still before the code generation phase, because this leads to a few problems, one of which is shown below.
x=1matchx:
case-0:
y=0
eclips4@nixos ~/p/p/cpython (remove-ast-optimizer)> ./python example.py
File "/home/eclips4/programming/programming-languages/cpython/example.py", line 4
case -0:
^^
SyntaxError: patterns may only match literals and attribute lookups
Feature or enhancement
Proposal:
For additional context see #126830 (comment).
Flow graph optimizer has more information and can do better job.
The problem is that we need to convert from
UNARY_OP(-, CONST(1))
toCONST(-1)
, still before the code generation phase, because this leads to a few problems, one of which is shown below.cc @markshannon
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
The text was updated successfully, but these errors were encountered: