import user_config
class feature_required(object):
    def __init__(self, f, feature, fallback):
        self.f = f
        self.feature = feature
        self.fallback = fallback
    
    def __call__(self):
        if user_config[logged_in_user.type][feature] is "on":
            self.f()
        else:
            self.fallback()

def get_menu_items(user_type):
    return [
        "Home",
        login_menu(),
        view_things_menu()
    ]

@feature_required("Login", login_menu_fallback)
def login_menu():
    return "Login"

def login_menu_fallback():
    return "Upgrade to Login"

@feature_required("View Things", vt_menu_fallback)
def view_things_menu():
    return "View Things!"

def vt_menu_fallback():
    return "Upgrade to view things"

Trying to think of a clever way to implement feature flags generally + cleanly across my entire application.