On May 16, 2008, at 4:53 PM, Dag Sverre Seljebotn wrote:

>
>> My first impression: I always feel funny putting blocks of code
>> inside string literals--but this looks more sane (compared to, say
>> doing string substitutions!). Temps can be done by using a
>> ExprNodes.TempNode.
>
> Ahh, didn't notice such a thing was already there, thanks!
>
> (Ideally I'd like for it to contain a reference to a handle for the
> temporary rather than "being" the temporary though, so that one  
> could more
> easily clone and chop and glue the tree without destroying it. But  
> we'll
> deal with this later...)
>
> If it helps with the funny feeling, the string is only parsed  
> directly in
> the constructor for TreeFragment (and it accepts a more directly  
> created
> node structure too). So the string disappears from the story after  
> module
> load time; from there it is only tree node manipulation (the  
> TreeFragment
> acts like a template which is cloned while substituting nodes on the
> clone). So there's nothing that requires the string but notational
> convenience.

Yes--the TreeFragment idea makes things much cleaner. Are EXPR et al.  
special words then?

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to