parameters: (iterator, env=None)
return_statement: return _inject()
docstring: For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics
docstring_summary: For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics
docstring_tokens: For a potential path iterator add DYLD_IMAGE_SUFFIX semantics
function: def dyld_image_suffix_search(iterator, env=None):
      """For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics"""
      suffix = dyld_image_suffix(env)
      if suffix is None:
          return iterator
      def _inject(iterator=iterator, suffix=suffix):
          for path in iterator:
              if path.endswith('.dylib'):
                  yield path[:-len('.dylib')] + suffix + '.dylib'
              else:
                  yield path + suffix
              yield path
      return _inject()
function_tokens: def dyld_image_suffix_search ( iterator , env = None ) : suffix = dyld_image_suffix ( env ) if suffix is None : return iterator def _inject ( iterator = iterator , suffix = suffix ) : for path in iterator : if path . endswith ( '.dylib' ) : yield path [ : - len ( '.dylib' ) ] + suffix + '.dylib' else : yield path + suffix yield path return _inject ( )