def _cmd_if_any()

in content/updates/workbench/3.0/dev/ezt.py [0:0]


  def _cmd_if_any(self, args, fp, ctx, filename, line_number):
    "If any value is a non-empty string or non-empty list, then T else F."
    (valrefs, t_section, f_section) = args
    value = 0
    for valref in valrefs:
      if _get_value(valref, ctx, filename, line_number):
        value = 1
        break
    self._do_if(value, t_section, f_section, fp, ctx)