mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-126835: Move const folding of lists & sets from ast_opt.c to flowgraph.c (#130032)
This commit is contained in:
parent
c7a9d06e06
commit
140e69c4a8
5 changed files with 231 additions and 120 deletions
|
@ -798,7 +798,7 @@ class TestSpecifics(unittest.TestCase):
|
|||
f3 = lambda x: x in {("not a name",)}
|
||||
self.assertIs(f1.__code__.co_consts[0],
|
||||
f2.__code__.co_consts[0][0])
|
||||
self.assertIs(next(iter(f3.__code__.co_consts[0])),
|
||||
self.assertIs(next(iter(f3.__code__.co_consts[1])),
|
||||
f2.__code__.co_consts[0])
|
||||
|
||||
# {0} is converted to a constant frozenset({0}) by the peephole
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue