bpo-30416: Protect the optimizer during constant folding. by serhiy-storchaka · Pull Request #4860 · python/cpython (original) (raw)
The old peephole optimizer doesn't have such limit (see bpo-30416). This is a limit for the total number of items, including nested tuples and sets. For example ((((((((1,)*20,)*20,)*20,)*20,)*20,)*20,)*20,)*20
contains around 21**8
items.
The size of every tuple and set is limited to 256 (was 20).
What the limit looks reasonable to you?