Is delayed evaluation possible ?

Terrence M. Brannon (brannon@jove.cs.caltech.edu)
Sat, 11 Jul 92 16:56:50 PDT

I am doing a large amount of substitution of variables into LONG strings in
python. The length of these strings is making my code unreadable.

2 questions:
Is it possible to alias a string that will have variables substituted
into it if the variables are not already defined such as:

xdr_stream.append('xdr_' dataType + \
'(&(M_RemoteProcessPointer->xdr_write), \
+ rpc_arg + '); \n)

can i do substr = ('xdr_' dataType + \
'(&(M_RemoteProcessPointer->xdr_write), \
+ rpc_arg + '); \n)

xdr.stream.append(substr) so that I dont have to ugly up my code ?

This also has another question built into it as to whether or not
unbound variables in strings are possible through the use of delayed
evaluation. This is a nice feature that Tcl has.

--
terrence brannon
brannon@jove.cs.caltech.edu