U C^E@sddlZddlZejddkZddZerXeZeZddl m Z ddZ dd Z d d Zn,eZeZdd l m Z d dZ dd Z dd ZdS)Ncs&Gfddd}t|ddiS)NcseZdZfddZdS)z!with_metaclass..metaclasscs ||SN)clsname this_basesdbasesmetar5/tmp/pip-install-6_kvzl1k/jmespath/jmespath/compat.py__new__ sz)with_metaclass..metaclass.__new__N)__name__ __module__ __qualname__r rr rr metaclass srtemporary_classr)typer )r r rrr r with_metaclasssr) izip_longestcCs|j|_dd}||_|S)z@Class decorator that handles __str__ compat between py2 and py3.cSs|dS)Nzutf-8) __unicode__encode)selfrrr __str__sz with_str_method..__str__)rr)rrrrr with_str_methodsrcs|jfdd}||_|S)z6Class decorator that handle __repr__ with py2 and py3.cs |}t|tr|d}|S)NZunicode_escape) isinstance text_typer)rZ original_reprZoriginal_repr_methodrr __repr__%s  z"with_repr_method..__repr__)r)rrrrr with_repr_methods rccs(tj|tjdD]\}}||fVqdSN) predicate)inspect getmembersismethodrrmethodrrr get_methods-sr') zip_longestcCs|Srrrrrr r7scCs|Srrr)rrr r;sccs(tj|tjdD]\}}||fVqdSr )r"r# isfunctionr%rrr r'>s)sysr" version_infoPY2runicoder basestringZ string_type itertoolsrr(rrr'strrrrr s