Viewing File: /opt/alt/python35/lib/python3.5/site-packages/idna/__pycache__/codec.cpython-35.opt-1.pyc



‡'¾Xãã@sâddlmZmZmZmZmZddlZddlZejdƒZ	Gdd„dej
ƒZ
Gdd„dejƒZGd	d
„d
ej
ƒZGdd„de
ejƒZGd
d„de
ejƒZdd„ZdS)é)ÚencodeÚdecodeÚalabelÚulabelÚ	IDNAErroréNu[.。.。]c@s.eZdZddd„Zddd„ZdS)ÚCodecÚstrictcCsA|dkr!tdj|ƒƒ‚|s+dSt|ƒt|ƒfS)Nr	z Unsupported error handling "{0}"Úr)r
r)rÚformatrÚlen)ÚselfÚdataÚerrors©rú	/codec.pyr	s
zCodec.encodecCsA|dkr!tdj|ƒƒ‚|s+dSt|ƒt|ƒfS)Nr	z Unsupported error handling "{0}"r
r)r
r)rrrr)r
rrrrrrs
zCodec.decodeN)Ú__name__Ú
__module__Ú__qualname__rrrrrrrs
rc@seZdZdd„ZdS)ÚIncrementalEncoderc	Csö|dkr!tdj|ƒƒ‚|s+dStj|ƒ}d}|ry|ds`d}|d	=n|sy|d
=|ryd}g}d}xA|D]9}|jt|ƒƒ|rµ|d7}|t|ƒ7}qŒWdj|ƒ|}|t|ƒ7}||fS)Nr	z Unsupported error handling "{0}"r
rrÚ.)r
réÿÿÿÿrr)rrÚ_unicode_dots_reÚsplitÚappendrrÚjoin)	r
rrÚfinalÚlabelsÚtrailing_dotÚresultÚsizeÚlabelrrrÚ_buffer_encodes0



z!IncrementalEncoder._buffer_encodeN)rrrr"rrrrrsrc@seZdZdd„ZdS)ÚIncrementalDecoderc	Cs0|dkr!tdj|ƒƒ‚|s+dSt|tƒrLtj|ƒ}n(t|ƒ}t|dƒ|jdƒ}d}|r³|d	sšd}|d
=n|s³|d=|r³d}g}d}xA|D]9}|jt|ƒƒ|rï|d7}|t	|ƒ7}qÆWdj
|ƒ|}|t	|ƒ7}||fS)Nr	z Unsupported error handling "{0}"r
rÚasciirr)r
rrrr)rrÚ
isinstanceÚunicoderrÚstrrrrr)	r
rrrrrrr r!rrrÚ_buffer_decode?s8




z!IncrementalDecoder._buffer_decodeN)rrrr(rrrrr#>sr#c@seZdZdS)ÚStreamWriterN)rrrrrrrr)gsr)c@seZdZdS)ÚStreamReaderN)rrrrrrrr*jsr*cCs@tjdddtƒjdtƒjdtdtdtdtƒS)	NÚnameZidnarrÚincrementalencoderÚincrementaldecoderÚstreamwriterÚstreamreader)	ÚcodecsÚ	CodecInforrrrr#r)r*rrrrÚgetregentryms	r2)Zcorerrrrrr0ÚreÚcompilerrÚBufferedIncrementalEncoderrÚBufferedIncrementalDecoderr#r)r*r2rrrrÚ<module>s(!)
Back to Directory File Manager