def get_controller_name(controller_class, with_prefix = True):
    controller_name = getattr(controller_class, 'controller_name', None)
    if controller_name is None:
        name_ = [controller_class.__name__[0]]
        prev = ''
        for l in re.sub(r"Controller$",'',controller_class.__name__[1:]):
            if l.isupper() and prev.islower():
                name_.append('_'+l)
            else:
                name_.append(l)
            prev = l
        controller_name = ''.join(name_).lower()

    controller_prefix = getattr(controller_class, 'controller_prefix', None)
    if with_prefix and (None, '') not in controller_prefix:
        controller_name = controller_class.controller_prefix + controller_name
    return controller_name
dataset/ETHPy150Open zeraien/django-url-framework/django_url_framework/controller.py/get_controller_name/swapped operands of `not in`