File: //lib/python3/dist-packages/twisted/python/__pycache__/_oldstyle.cpython-38.pyc
U
W[!
� @ st d Z ddlmZmZ ddlZddlmZ ddlmZm Z dd� Z
dd � Zd
d� Ze
e e�e
e� e�dd
� ��Z
dS )zD
Utilities to assist in the "flag day" new-style object transition.
� )�absolute_import�divisionN)�wraps)�_shouldEnableNewStyle�_PY3c s � �fdd�}|S )a2
If C{condition}, replace this function with C{alternative}.
@param condition: A L{bool} which says whether this should be replaced.
@param alternative: An alternative function that will be swapped in instead
of the original, if C{condition} is truthy.
@return: A decorator.
c sF �dkr�� n �dkr| � nt d�t�����t| �� fdd��}|S )NTFz8condition argument to _replaceIf requires a bool, not {}c s
� | |�S )N� )�args�kwargs��callr �:/usr/lib/python3/dist-packages/twisted/python/_oldstyle.py�wrapped'