def next(itr, default=_undef):
        "compat wrapper for next()"
        if default is _undef:
            return itr.next()
        try:
            return itr.next()
        except __HOLE__:
            return default
dataset/ETHPy150Open twisted/ldaptor/ldaptor/compat.py/next