def render_tooltip(label, comment, _class='tooltip'):
 if (not comment):
  tooltip = ''
 elif isinstance(comment, (lazyT, basestring)):
  if hasattr(label, 'flatten'):
   label = label.flatten().strip('*')
  tooltip = DIV(_class=_class, _title=('%s|%s' % (label, comment)))
 else:
  tooltip = comment
 return tooltip

def render_tooltip ( label , comment , _class = 'tooltip' ) : if ( not comment ) : tooltip = '' elif isinstance ( comment , ( lazyT , basestring ) ) : if hasattr ( label , 'flatten' ) : label = label . flatten ( ) . strip ( '*' ) tooltip = DIV ( _class = _class , _title = ( '%s|%s' % ( label , comment ) ) ) else : tooltip = comment return tooltip
render a tooltip for a form field .