[PEAK] PEAK-Rules indexing performance

Phillip J. Eby pje at telecommunity.com
Sat Jan 10 17:32:31 EST 2009


At 04:37 PM 1/10/2009 -0500, Phillip J. Eby wrote:
>(Also, technically speaking, for this to be correct one should 
>include isinstance and issubclass in the push, so as to ensure that 
>the caller didn't change or mask them.  That is a downside of macros 
>in general, of course.)

I also neglected to mention that if you do this, you need to wrap 
them in Constant() objects, i.e.:

     __builder__.push({..., 'isinstance':Constant(isinstance), ...})

Because builder bindings need to be AST structures, not Python 
values.  (The support code that creates the builder in the first 
place already does this Constant()-wrapping for the original 
context's locals and globals.)



More information about the PEAK mailing list