[issue32525] Empty tuples are not optimized as constant expressions

2018-01-10 Thread Brett Cannon
Change by Brett Cannon : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue32525] Empty tuples are not optimized as constant expressions

2018-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks like it was already fixed in Python 3.7: $ ./python.exe Python 3.7.0a3+ (heads/master:7f7de371f9, Jan 6 2018, 21:35:03) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from dis

[issue32525] Empty tuples are not optimized as constant expressions

2018-01-09 Thread benrg
New submission from benrg : >From 3.3 on, the expression () is compiled to BUILD_TUPLE 0 instead of >LOAD_CONST. That's probably fine and I suppose it's slightly more efficient to >avoid adding an entry to the constant table. The problem is that BUILD_TUPLE 0 is not treated as a constant for f