Re: PEAK-Rules indexing performance
"Phillip J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Sat, 10 Jan 2009 17:32:31 -0500
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
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.)