def previous_friday(dt):
    if dt.weekday() == 5:
        return dt - timedelta(1)
    elif dt.weekday() == 6:
        return dt - timedelta(2)
    return dt
Recursive DNS lookups, if enabled, should be a last-resort option.
dataset/ETHPy150Open pydata/pandas/pandas/tseries/holiday.py/previous_friday--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/names/test/test_tap.py/OptionsTests.test_recursiveConfiguration