parameters: (opt)
return_statement: return theRet
docstring: This function parses the options to --download and returns a set such as { icu: true }, etc.
docstring_summary: This function parses the options to --download and returns a set such as { icu: true }, etc.
docstring_tokens: This function parses the options to -- download and returns a set such as { icu : true } etc .
function: def parse(opt):
    """This function parses the options to --download and returns a set such as { icu: true }, etc. """
    if not opt:
      opt = download_default
  
    theOpts = set(opt.split(','))
  
    if 'all' in theOpts:
      # all on
      return set2dict(download_types, True)
    elif 'none' in theOpts:
      # all off
      return set2dict(download_types, False)
  
    # OK. Now, process each of the opts.
    theRet = set2dict(download_types, False)
    for anOpt in opt.split(','):
      if not anOpt or anOpt == "":
        # ignore stray commas, etc.
        continue
      elif anOpt == 'all':
        # all on
        theRet = dict((key, True) for (key) in download_types)
      else:
        # turn this one on
        if anOpt in download_types:
          theRet[anOpt] = True
        else:
          # future proof: ignore unknown types
          print('Warning: ignoring unknown --download= type "%s"' % anOpt)
    # all done
    return theRet
function_tokens: def parse ( opt ) : if not opt : opt = download_default theOpts = set ( opt . split ( ',' ) ) if 'all' in theOpts : # all on return set2dict ( download_types , True ) elif 'none' in theOpts : # all off return set2dict ( download_types , False ) # OK. Now, process each of the opts. theRet = set2dict ( download_types , False ) for anOpt in opt . split ( ',' ) : if not anOpt or anOpt == "" : # ignore stray commas, etc. continue elif anOpt == 'all' : # all on theRet = dict ( ( key , True ) for ( key ) in download_types ) else : # turn this one on if anOpt in download_types : theRet [ anOpt ] = True else : # future proof: ignore unknown types print ( 'Warning: ignoring unknown --download= type "%s"' % anOpt ) # all done return theRet