I'd like to do something like this in templator:
$for myvar in myvars:
$var myobject: $longcomputation($myvar)
$dosomething($myobject)
$dosomethingelse($myobject)
Currently this draws an error, since the 'var' statement cannot even
see 'myvar'. Even if that were fixed, I have the feeling that the
'var' statement would stringify 'myobject', which would prevent me
from doing other things with it.
Is there some reason it wouldn't make more sense to (a) make the for
variable visible in this case, and (b) not stringify the 'var'
expression?
(My current workaround would be to grab an env dict like 'locals',
stow the for variable value there, than access it elsewhere.
Obviously, this sucks.)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---