twisted.python._oldstyle
module documentationtwisted.python
View Source
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 |
Ensure that cls
is an old-style class.
Parameters | cls | The class to check. |
Returns | The class, if it is an old-style class. | |
Raises | ValueError
if it is a new-style class. |
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.
Parameters | cls | An old-style class to convert to new-style. (type: types.ClassType ) |
Returns | A new-style version of cls . |