def sequify(coll):
    """ Returns an iterator on coll, just like iter(coll). dict-like objects
        will be treated as sequences of (key, value) pairs, however.

    >>> list(sequify([]))
    []
    >>> list(sequify({'a': 1, 'b': 2}))
    [('a', 1), ('b', 2)]
    >>> list(sequify('foo'))
    ['f', 'o', 'o']
    >>> it = sequify([1, 2])
    >>> it.next()
    1
    """
    if hasattr(coll, 'iteritems'):
        return coll.iteritems()
    elif hasattr(coll, 'items'):
        return iter(coll.items())
    return iter(coll)