Utilities to assist in the "flag day" new-style object transition.

Function passthru Return arg. Do nothing.
Function _ensureOldClass Ensure that cls is an old-style class.
Function _oldStyle No summary
def passthru(arg): (source)

Return arg. Do nothing.

ParametersargThe arg to return.
Returnsarg
def _ensureOldClass(cls): (source)

Ensure that cls is an old-style class.

ParametersclsThe class to check.
ReturnsThe class, if it is an old-style class.
RaisesValueError if it is a new-style class.
@_replaceIf(_PY3, passthru)
@_replaceIf(_shouldEnableNewStyle(), _ensureOldClass)
def _oldStyle(cls): (source)

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

ParametersclsAn old-style class to convert to new-style. (type: types.ClassType)
ReturnsA new-style version of cls.
API Documentation for Twisted, generated by pydoctor at 2018-07-14 04:53:34.