Guido van Rossum wrote:
On Tue, Jun 16, 2009 at 11:24 AM, Terry Reedytjreedy@udel.edu wrote:
Collection-content displays are not, in general, constant and generally produce run-time code.
Somewhat expanded, I meant this:
Literals represent constants. They are sensibly interpreted into constants sometime before runtime, even if at a later stage than I thought.
Displays, in general, can contain variables and expressions that can only be evaluated at runtime. Therefore, the object they represent must, in general, be evaluated at runtime. (The pre-computation of tuples that only contain constants is an implementation-specific special case optimization.)
Code literals and code displays are, in this way among others, different beasts. Therefore, a device used for literals is not necessarily a good device for displays. The latter use needs more justification than the precedent of the former use.
The OP has not provided such justification for an admittedly ugly device.
-1 (which we agree on)
Terry Jan Reedy