class_docstr: The :class:`PathSpec` class is a wrapper around a list of compiled
  :class:`.Pattern` instances.
docstr: Initializes the :class:`PathSpec` instance.
  
  *patterns* (:class:`~collections.abc.Collection` or :class:`~collections.abc.Iterable`)
  yields each compiled pattern (:class:`.Pattern`).
docstr_tok: ["Initializes","the",":","class",":","`","PathSpec","`","instance",".","*","patterns","*","(",":","class",":","`","~collections.abc.Collection","`","or",":","class",":","`","~collections.abc.Iterable","`",")","yields","each","compiled","pattern","(",":","class",":","`",".Pattern","`",")","."]
code: def __init__(self, patterns):
      """
      Initializes the :class:`PathSpec` instance.
  
      *patterns* (:class:`~collections.abc.Collection` or :class:`~collections.abc.Iterable`)
      yields each compiled pattern (:class:`.Pattern`).
      """
  
      self.patterns = (
          patterns
          if isinstance(patterns, Collection)
          else list(patterns)
      )
      """
  		*patterns* (:class:`~collections.abc.Collection` of :class:`.Pattern`)
  		contains the compiled patterns.
  		"""
  
file_path: ray/python/ray/_private/thirdparty/pathspec/pathspec.py
imports: from .None import util
  from .compat import Collection, iterkeys, izip_longest, string_types, unicode
label_desc: Use image node_id 1 to create a new PathSpec object from inherited base classes: object with example: obj = PathSpec(patterns)