Pedro Sanchez wrote:
Hello,
I have a situation like this:
class myPage(rend.Page):
def render_salute(self, context, data): rv =
if <condition>: rv = loaders.stan(T.p['You made it']) return rv docFactory = loaders.stan( .... T.invisible(render=T.directive('salute')) ....
What I want in render_salute is to return 'nothing' if <condition> is false. Basically, as if the T.invisible in the docFactory didn't exist. I've tried
= loaders.stan(T.p['']) but it has the side effect of forcing a line break which is undesirable (in my real code the T.invisible is inside a table cell). Even returning a string would do it! Any suggestions?
return '' Semantically, "return None" is better but the Big Red None is such a useful debugging aid that returning the emptry string is used to indicate HTML nothingness. - Matt