Returns an iterator wrapping the underlying enumeration
188869
public Iterator<E> iterator() {

        return new Iterator<E>() {

            public boolean hasNext() {
                return enumeration.hasMoreElements();
            }

            public E next() {
                return enumeration.nextElement();
            }

            public void remove() {
                throw new UnsupportedOperationException("IterableEnumeration does not support remove");
            }
        };
    }
847215
def multi_iter(iterable, count=2):
    """"""
    # no need to special-case re-usable, container-like iterables
    if not isinstance(
            iterable,
            (
                    list, tuple, set,
                    FutureChainResults,
                    collections.Sequence, collections.Set, collections.Mapping, collections.MappingView
            )):
        iterable = SafeTee(iterable, n=count)
    return (iter(iterable) for _ in range(count))
1032587
def each
      return to_enum(__callee__) unless block_given?

      node = self
      loop do
        yield node
        break unless (node = node.next_node)
      end
    end
1281303
function iteratorFor(items) {
  const iterator = {
    next() {
      const value = items.shift();
      return {
        done: value === undefined,
        value
      };
    }
  };

  if (isSupportIterable) {
    iterator[Symbol.iterator] = () => iterator;
  }

  return iterator;
}
631292
def _enumerator(opener, entry_cls, format_code=None, filter_code=None):
    

    archive_res = _archive_read_new()

    try:
        r = _set_read_context(archive_res, format_code, filter_code)
        opener(archive_res)

        def it():
            while 1:
                with _archive_read_next_header(archive_res) as entry_res:
                    if entry_res is None:
                        break

                    e = entry_cls(archive_res, entry_res)
                    yield e
                    if e.is_consumed is False:
                        _archive_read_data_skip(archive_res)
        yield it()
    finally:
        _archive_read_free(archive_res)
461086
public static <T> Iterable<T> toIterable(Enumeration<T> in) {
        List<T> out = new LinkedList<T>();
        while(in.hasMoreElements()) {
            out.add(in.nextElement());
        }
        return out;
    }
283435
private static <T> Iterator<Iterator<? extends T>> iterators(
      Iterable<? extends Iterable<? extends T>> iterables) {
    return new TransformedIterator<Iterable<? extends T>, Iterator<? extends T>>(
        iterables.iterator()) {
      @Override
      Iterator<? extends T> transform(Iterable<? extends T> from) {
        return from.iterator();
      }
    };
  }
788785
public Iterator iterator()
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "iterator");

        Iterator iterator = subList(null, null).iterator();

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "iterator",
                       new Object[] { iterator });
        return iterator;
    }
682642
public Iterator<Node> iterator() {

        return new Iterator<Node>() {
            private int currentIndex = 0;
            
            public boolean hasNext() {
                return currentIndex < nodeList.getLength();
            }
            
            public Node next() {
                Node next = nodeList.item(currentIndex);
                currentIndex++;
                if (next == null) {
                    throw new NoSuchElementException("No element found for index: " + currentIndex);
                }
                return next;
            }
            
            public void remove() {
                throw new UnsupportedOperationException("IterableNodeList does not support remove");
            }
        };
    }
381230
public static <E> Iterator<E> asIterator(Enumeration<E> e) {
		return new EnumerationIter<E>(e);
	}
219316
def iterator_from_slice(s):
    
    import numpy as np
    start = s.start if s.start is not None else 0
    step = s.step if s.step is not None else 1

    if s.stop is None:
        # Infinite iterator.
        return itertools.count(start=start, step=step)
    else:
        # xrange-like iterator that supports float.
        return iter(np.arange(start, s.stop, step))
1300724
def iterator(n: Union[Node, CompatNodeIterator, dict],
        order: TreeOrder = TreeOrder.PRE_ORDER) -> CompatNodeIterator:
    

    if isinstance(n, CompatNodeIterator):
        return CompatNodeIterator(n._nodeit.iterate(order), only_nodes=True)
    elif isinstance(n, Node):
        nat_it = native_iterator(n.internal_node, order)
        return CompatNodeIterator(NodeIterator(nat_it), only_nodes=True)
    elif isinstance(n, dict):
        nat_it = native_iterator(n, order)
        return CompatNodeIterator(NodeIterator(nat_it, uast()), only_nodes=True)
    else:
        raise WrongTypeException(
            "iterator on non node or iterator type (%s)" % str(type(n))
        )
279012
def to_enum(match: '*', count: 10, with_scores: false)
      enumerator = self.connection.zscan_each(@key, match: match, count: count)
      return enumerator if with_scores
      return Enumerator.new do |yielder|
        loop do
          item, = enumerator.next
          yielder << item
        end
      end
    end
947864
public static <E> Iterable<E> asIterable(final Iterator<E> iter) {
		return new Iterable<E>() {
			@Override
			public Iterator<E> iterator() {
				return iter;
			}
		};
	}
1094103
def iterator(self, **kwargs):
        
        cls_name = '{0}Collection'.format(self._cls.__name__)
        collection_cls = type(str(cls_name), (ElementCollection,), {})

        params = {'filter_context': self._cls.typeof}
        params.update(kwargs)
        return collection_cls(**params)
834031
public Iterator<QueryBinding> iterator() 
	{
		List<QueryBinding> iBindings = new ArrayList<QueryBinding>();
		for(QueryBindingImpl b : bindings) {
			iBindings.add(b);
		}
		return iBindings.iterator();
	}
964361
def Skip(self: Iterable, n):
    
    con = iter(self)
    for i, _ in enumerate(con):
        if i == n:
            break
    return con