def is_iterable(obj):
    """Check weather this ``object`` is an iterable.
    
    There are two kinds of implementations. The other is using ``collections.Iterable``. [1]_
    
    .. code:: python

        import collections

        def is_iterable(obj):
            if isinstance(obj, collections.Iterable):
                return True
            else:
                return False

    Checking for :meth:`__iter__` works on sequence types, but it would fail on 
    e.g. strings in `Python 2`. The :meth:`iter` built-in checks for the :meth:`__iter__` 
    method or in the case of strings the :meth:`__getitem__` method. In `Python 2`, to check 
    if an object is "list like" and not "string like" then the key is the attributes 
    :meth:`__getitem__` and :meth:`__iter__`. [2]_
    
    >>> hasattr([1,2,3,4], '__iter__')
    >>> True
    >>> hasattr((1,2,3,4), '__iter__')
    >>> True
    >>> hasattr(u"hello", '__iter__')
    >>> False
    >>> hasattr(u"hello", '__getitem__')
    >>> True
    
    Parameters
    ----------
    obj : object
       
    Returns
    -------
    boolean
        True or False.
        
    References
    ----------
    
    .. [1] http://stackoverflow.com/questions/19919314/how-to-check-isinstance-of-iterable-in-python
    .. [2] http://stackoverflow.com/questions/1952464/in-python-how-do-i-determine-if-an-object-is-iterable
    
    """
    if hasattr(obj, '__iter__'):
        return True
    if hasattr(obj, '__getitem__'):
        return True
    return False
