File: //usr/lib/python3.6/site-packages/jmespath/__pycache__/compat.cpython-36.opt-1.pyc
3
�2VT � @ s� d dl Z d dlZe jd dkZerPeZeZd dlm Z
dd� Zdd� Zdd � Z
n,eZeZd d
lm
Z
dd� Zdd� Zd
d � Z
dS )� N� )�izip_longestc C s | j | _dd� }|| _ | S )z@Class decorator that handles __str__ compat between py2 and py3.c S s | j � jd�S )Nzutf-8)�__unicode__�encode)�self� r �/usr/lib/python3.6/compat.py�__str__ s z with_str_method.<locals>.__str__)r r )�clsr r r r �with_str_method s r c s | j � � fdd�}|| _ | S )z6Class decorator that handle __repr__ with py2 and py3.c s � | �}t |t�r|jd�}|S )NZunicode_escape)�
isinstance� text_typer )r Z
original_repr)�original_repr_methodr r �__repr__ s
z"with_repr_method.<locals>.__repr__)r )r
r r )r r �with_repr_method s r c c s, x&t j| t jd�D ]\}}||fV qW d S )N)� predicate)�inspect�
getmembersZismethod)r
�name�methodr r r �get_methods$ s r )�zip_longestc C s | S )Nr )r
r r r r . s c C s | S )Nr )r
r r r r 2 s c c s, x&t j| t jd�D ]\}}||fV qW d S )N)r )r r Z
isfunction)r
r r r r r r 5 s )�sysr �version_infoZPY2Zunicoder
Z
basestringZstring_type� itertoolsr r r r r �strr r r r �<module> s