> I'm very glad you introduced the optimization of building small > constant tuples at compile-time. IMO, that was a pure win.
It's been out in the wild for a while now with no issues. I'm somewhat happy with it. > the transformation isn't semantically correct on the > face of it. Well that's the end of that. What we really need is a clean syntax for specifying a constant frozenset without compiler transformations of tuples. That would have the further advantage of letting builtins and globals be used as element values. if isinstance(x, {int, float, complex}): if opcode in {REPEAT, MIN_REPEAT, MAX_REPEAT}: if (code in {301, 302, 303, 307} and m in {"GET", "HEAD"}: if op in (ROT_TWO, POP_TOP, LOAD_FAST) Perhaps something other notation would be better but the idea is basically the same. Raymond _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com