A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-February/051690.html below:

[Python-Dev] Prospective Peephole Transformation

[Python-Dev] Prospective Peephole TransformationRaymond Hettinger python at rcn.com
Sat Feb 19 05:47:01 CET 2005
> 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
More information about the Python-Dev mailing list

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