class_docstr: This class abstracts handling of a set of version specifiers.
  
  It can be passed a single specifier (``>=3.0``), a comma-separated list of
  specifiers (``>=3.0,!=3.1``), or no specifier at all.
docstr: Initialize a SpecifierSet instance.
  
  :param specifiers:
      The string representation of a specifier or a comma-separated list of
      specifiers which will be parsed and normalized before use.
  :param prereleases:
      This tells the SpecifierSet if it should accept prerelease versions if
      applicable or not. The default of ``None`` will autodetect it from the
      given specifiers.
  
  :raises InvalidSpecifier:
      If the given ``specifiers`` are not parseable than this exception will be
      raised.
docstr_tok: ["Initialize","a","SpecifierSet","instance",".",":","param","specifiers",":","The","string","representation","of","a","specifier","or","a","comma-separated","list","of","specifiers","which","will","be","parsed","and","normalized","before","use",".",":","param","prereleases",":","This","tells","the","SpecifierSet","if","it","should","accept","prerelease","versions","if","applicable","or","not",".","The","default","of","``","None","``","will","autodetect","it","from","the","given","specifiers",".",":","raises","InvalidSpecifier",":","If","the","given","``","specifiers","``","are","not","parseable","than","this","exception","will","be","raised","."]
code: def __init__(
      self, specifiers: str = "", prereleases: Optional[bool] = None
  ) -> None:
      """Initialize a SpecifierSet instance.
  
      :param specifiers:
          The string representation of a specifier or a comma-separated list of
          specifiers which will be parsed and normalized before use.
      :param prereleases:
          This tells the SpecifierSet if it should accept prerelease versions if
          applicable or not. The default of ``None`` will autodetect it from the
          given specifiers.
  
      :raises InvalidSpecifier:
          If the given ``specifiers`` are not parseable than this exception will be
          raised.
      """
  
      # Split on `,` to break each individual specifier into it's own item, and
      # strip each item to remove leading/trailing whitespace.
      split_specifiers = [
          s.strip() for s in specifiers.split(",") if s.strip()
      ]
  
      # Make each individual specifier a Specifier and save in a frozen set for later.
      self._specs = frozenset(map(Specifier, split_specifiers))
  
      # Store our prereleases value so we can use it later to determine if
      # we accept prereleases or not.
      self._prereleases = prereleases
  
imports: import abc
  import itertools
  import re
  from typing import Callable, Iterable, Iterator, List, Optional, Tuple, TypeVar, Union
  from .utils import canonicalize_version
  from .version import Version
label_desc: Use image node_id 1 to create a new SpecifierSet object from inherited base classes: BaseSpecifier with example: obj = SpecifierSet(specifiers, prereleases)