Cesare Di Mauro <cesare.dimauro <at> a-tono.com> writes: > def f(): return ['a', ('b', 'c')] * (1 + 2 * 3) [...] > > With proper constant folding code, both functions can be reduced > to a single LOAD_CONST and a RETURN_VALUE (or, definitely, by > a single instruction at all with an advanced peephole optimizer). Lists are mutable, you can't optimize the creation of list literals by storing them as singleton constants. Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4