← Back
Editing: __init__.cpython-38.pyc
U �OX = � @ s� d Z ddlmZmZ ddlZddlZddlZejdk r<dZndZe Z dd� ZzeZ W n ek rp d d � Z Y nX dd� ZeG d d� de��Ze� ZG dd� de�ZeG dd� de��Zdd� Zdd� ZddlmZ dddgZdS )z0 Versions for Python packages. See L{Version}. � )�division�absolute_importN)� r FTc C s` t | ttf�std| ��tr>t | t�r2| �d�S | �d� nt | t�rR| �d�S | �d� | S )a Convert C{bytes} or C{unicode} to the native C{str} type, using ASCII encoding if conversion is necessary. @raise UnicodeError: The input string is not ASCII encodable/decodable. @raise TypeError: The input is neither C{bytes} nor C{unicode}. z%r is neither bytes nor unicode�ascii)� isinstance�bytes�unicode� TypeError�_PY3�decode�encode)�s� r �6/usr/lib/python3/dist-packages/incremental/__init__.py� _nativeString s r c C s | |k rdS | |krdS dS dS )z� Compare two objects. Returns a negative number if C{a < b}, zero if they are equal, and a positive number if C{a > b}. ���r � Nr )�a�br r r �_cmp7 s r c C s` t s| S dd� }dd� }dd� }dd� }d d � }dd� }|| _|| _|| _|| _|| _|| _| S ) z� Class decorator that ensures support for the special C{__cmp__} method. On Python 2 this does nothing. On Python 3, C{__eq__}, C{__lt__}, etc. methods are added to the class, relying on C{__cmp__} to implement their comparisons. c S s | � |�}|tkr|S |dkS �Nr ��__cmp__�NotImplemented��self�other�cr r r �__eq__S s z_comparable.<locals>.__eq__c S s | � |�}|tkr|S |dkS r r r r r r �__ne__Y s z_comparable.<locals>.__ne__c S s | � |�}|tkr|S |dk S r r r r r r �__lt___ s z_comparable.<locals>.__lt__c S s | � |�}|tkr|S |dkS r r r r r r �__le__e s z_comparable.<locals>.__le__c S s | � |�}|tkr|S |dkS r r r r r r �__gt__k s z_comparable.<locals>.__gt__c S s | � |�}|tkr|S |dkS r r r r r r �__ge__q s z_comparable.<locals>.__ge__)r r r"