parameters: (self, versionPredicateStr)
docstring: Parse a version predicate string.
docstring_summary: Parse a version predicate string.
docstring_tokens: Parse a version predicate string .
function: def __init__(self, versionPredicateStr):
          """Parse a version predicate string.
          """
          # Fields:
          #    name:  package name
          #    pred:  list of (comparison string, StrictVersion)
  
          versionPredicateStr = versionPredicateStr.strip()
          if not versionPredicateStr:
              raise ValueError("empty package restriction")
          match = re_validPackage.match(versionPredicateStr)
          if not match:
              raise ValueError("bad package name in %r" % versionPredicateStr)
          self.name, paren = match.groups()
          paren = paren.strip()
          if paren:
              match = re_paren.match(paren)
              if not match:
                  raise ValueError("expected parenthesized list: %r" % paren)
              str = match.groups()[0]
              self.pred = [splitUp(aPred) for aPred in str.split(",")]
              if not self.pred:
                  raise ValueError("empty parenthesized list in %r"
                                   % versionPredicateStr)
          else:
              self.pred = []
function_tokens: def __init__ ( self , versionPredicateStr ) : # Fields: #    name:  package name #    pred:  list of (comparison string, StrictVersion) versionPredicateStr = versionPredicateStr . strip ( ) if not versionPredicateStr : raise ValueError ( "empty package restriction" ) match = re_validPackage . match ( versionPredicateStr ) if not match : raise ValueError ( "bad package name in %r" % versionPredicateStr ) self . name , paren = match . groups ( ) paren = paren . strip ( ) if paren : match = re_paren . match ( paren ) if not match : raise ValueError ( "expected parenthesized list: %r" % paren ) str = match . groups ( ) [ 0 ] self . pred = [ splitUp ( aPred ) for aPred in str . split ( "," ) ] if not self . pred : raise ValueError ( "empty parenthesized list in %r" % versionPredicateStr ) else : self . pred = [ ]