def _isnamedtuple(obj):
    """Named tuples are identified via duck typing:
       <http://www.gossamer-threads.com/lists/python/dev/1142178>
    """
    return isinstance(obj, tuple) and hasattr(obj, '_fields')
