def _get_or_default(mylist, i, *, default):
    """return list item number, or default if don't exist"""
    if i >= len(mylist):
        return default
    else:
        return mylist[i]
return list item number, or default if don't exist
angrmanagement/vendor/qtconsole/util.py