def _oldStyle(cls):
    """
    A decorator which conditionally converts old-style classes to new-style
    classes. If it is Python 3, or if the C{TWISTED_NEWSTYLE} environment
    variable has a falsey (C{no}, C{false}, C{False}, or C{0}) value in the
    environment, this decorator is a no-op.

    @param cls: An old-style class to convert to new-style.
    @type cls: L{types.ClassType}

    @return: A new-style version of C{cls}.
    """
    _ensureOldClass(cls)
    _bases = cls.__bases__ + (object,)
    return type(cls.__name__, _bases, cls.__dict__)

    A decorator which conditionally converts old-style classes to new-style
    classes. If it is Python 3, or if the C{TWISTED_NEWSTYLE} environment
    variable has a falsey (C{no}, C{false}, C{False}, or C{0}) value in the
    environment, this decorator is a no-op.

    @param cls: An old-style class to convert to new-style.
    @type cls: L{types.ClassType}

    @return: A new-style version of C{cls}.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/_oldstyle.py