3 �^� � @ s` d dl mZ ddlmZmZ ddlmZ ddlmZ ddl m Z ddlmZ G dd � d e�Z d S )� )�MLSDisabled� )� SymbolWrapper�Wrapper)�RangeWrapper)�role_wrapper_factory)�type_wrapper_factory)�user_wrapper_factoryc @ s4 e Zd ZdZdZdd� Zdd � Zd d� Zdd � ZdS )�ContextWrapperz#Wrap contexts to allow comparisons.�user�role�type_�range_c C sZ || _ t|j�| _t|j�| _t|j�| _yt|j�| _W n t k rT d | _Y nX d S )N) �originr r r r r r r r r )�selfZctx� r �/usr/lib64/python3.6/context.py�__init__# s zContextWrapper.__init__c C s t | j�S )N)�hashr )r r r r �__hash__. s zContextWrapper.__hash__c C s0 | j |j ko.| j|jko.| j|jko.| j|jkS )N)r r r r )r �otherr r r �__eq__1 s zContextWrapper.__eq__c C s0 | j |j k o.| j|jk o.| j|jk o.| j|jk S )N)r r r r )r r r r r �__lt__7 s zContextWrapper.__lt__N)r r r r ) �__name__� __module__�__qualname__�__doc__� __slots__r r r r r r r r r s r N)Z exceptionr � differencer r Zmlsr Zrolesr �typesr Zusersr r r r r r �<module> s