def iter_fields(node):
    """
    Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields``
    that is present on *node*.
    """
    for field in node._fields:
        try:
            yield field, getattr(node, field)
        except __HOLE__:
            pass
dataset/ETHPy150Open eBay/restcommander/play-1.2.4/python/Lib/ast.py/iter_fields