Message359326
Hi Anthony,
> not sure if this is intentional or not
Thanks for the catch! Is not intentional. Could you made a PR adding the line?
> Happy to make a patch which adds a line there if someone can help me with the test
We do not have explicit tests for constant folding in the ast level an, in this case, is going to be folded anyway via another code path. For example:
def g():
def f(x : 3 in {1,2,3}, /): ...
return f
print(g.__code__.co_consts[2])
frozenset({1, 2, 3}) |
|
Date |
User |
Action |
Args |
2020-01-05 10:08:08 | pablogsal | set | recipients:
+ pablogsal, Anthony Sottile |
2020-01-05 10:08:08 | pablogsal | set | messageid: <1578218888.68.0.377429481427.issue39216@roundup.psfhosted.org> |
2020-01-05 10:08:08 | pablogsal | link | issue39216 messages |
2020-01-05 10:08:08 | pablogsal | create | |
|