%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/encodings/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/encodings/punycode.pyc


Oac@sdZddlZdZdZdZdZdZdZd	Zd
Z	dZ
dZd
ZdZ
dZdejfdYZdejfdYZdejfdYZdeejfdYZdeejfdYZdZdS(sX Codec for the Punicode encoding, as specified in RFC 3492

Written by Martin v. Lwis.
iNcCs{g}i}x:|D]2}t|dkr;|j|qd||<qW|j}|jdj|jd|fS(s 3.1 Basic code point segregationiittascii(tordtappendtkeystsorttjointencode(tstrtbasetextendedtc((s./usr/local/lib/python2.7/encodings/punycode.pyt	segregates

cCs:d}x-|D]%}t||kr
|d7}q
q
W|S(s@Return the length of str, considering only characters below max.ii(R(RtmaxtresR((s./usr/local/lib/python2.7/encodings/punycode.pyt
selective_lens

cCsnt|}x[|d7}||kr)dS||}||krM|d|fS||kr|d7}qqWdS(sReturn a pair (index, pos), indicating the next occurrence of
    char in str. index is the position of the character considering
    only ordinals up to and including char, and pos is the position in
    the full string. index/pos is the starting position in the full
    string.iiN(ii(tlen(RtchartindextpostlR((s./usr/local/lib/python2.7/encodings/punycode.pytselective_find s

cCsd}g}d}x|D]}d}}t|}t||}	|	d||}
xZt||||\}}|dkrPn|
||7}
|j|
d|}d}
qYW|}qW|S(s3.2 Insertion unsort codingiiii(RRRR(RR
toldchartresulttoldindexRRRRtcurlentdelta((s./usr/local/lib/python2.7/encodings/punycode.pytinsertion_unsort2s$



cCs6d|d|}|dkr"dS|dkr2dS|S(Ni$ii((tjtbiasR((s./usr/local/lib/python2.7/encodings/punycode.pytTHst$abcdefghijklmnopqrstuvwxyz0123456789cCsg}d}xqt||}||kr?|jt||S|jt|||d|||d|}|d7}qWdS(s(3.3 Generalized variable-length integersii$iN(RRtdigits(tNRRRtt((s./usr/local/lib/python2.7/encodings/punycode.pytgenerate_generalized_integerPs!cCsr|r|d}n
|d}|||7}d}x$|dkrW|d}|d7}q4W|d||d}|S(Niiiii#i$i&((Rtfirsttnumcharst	divisionsR((s./usr/local/lib/python2.7/encodings/punycode.pytadapt]s


cCsrg}d}xVt|D]H\}}t||}|j|t||dk||d}qWdj|S(s3.4 Bias adaptationiHiiR(t	enumerateR#textendR'R(tbaselentdeltasRRtpointsRts((s./usr/local/lib/python2.7/encodings/punycode.pytgenerate_integersls
$cCs[t|\}}|jd}t||}tt||}|rW|d|S|S(NRt-(RRRR.R(ttextR	R
R+((s./usr/local/lib/python2.7/encodings/punycode.pytpunycode_encodewsc
Cs<d}d}d}x#yt||}Wn4tk
r_|dkrQtdn|ddfSX|d7}d|kodknr|d}nVd|kodknr|d	}n-|dkrtd
||n
|dfSt||}	|||7}||	kr||fS|d|	}|d7}qWdS(
s(3.3 Generalized variable-length integersiitstrictsincomplete punicode stringiAiZi0i9is Invalid extended code point '%s'i$N(Rt
IndexErrortUnicodeErrortNoneR(
R
textposRterrorsRtwRRtdigitR"((s./usr/local/lib/python2.7/encodings/punycode.pytdecode_generalized_numbers2





c	Csd}d}d}d}x|t|krt||||\}}|d
krX|S||d7}||t|d7}|dkr|dkrtd|ntd	}n|t|d}|| t|||}t||dkt|}|}qW|S(s3.2 Insertion unsort codingiiiHiiiR2sInvalid character U+%xt?N(RR:R5R4RtunichrR'(	R	R
R7RRRR6tnewposR((s./usr/local/lib/python2.7/encodings/punycode.pytinsertion_sorts(	
cCsp|jd}|dkr*d}|}n|| }||d}t|d|}|j}t|||S(NR/iRiR(trfindtunicodetupperR>(R0R7RR	R
((s./usr/local/lib/python2.7/encodings/punycode.pytpunycode_decodes	
tCodeccBs eZddZddZRS(R2cCst|}|t|fS(N(R1R(tselftinputR7R((s./usr/local/lib/python2.7/encodings/punycode.pyRscCs;|dkrtd|nt||}|t|fS(NR2treplacetignoresUnsupported error handling (R2RFRG(R4RBR(RDRER7R((s./usr/local/lib/python2.7/encodings/punycode.pytdecodes(t__name__t
__module__RRH(((s./usr/local/lib/python2.7/encodings/punycode.pyRCstIncrementalEncodercBseZedZRS(cCs
t|S(N(R1(RDREtfinal((s./usr/local/lib/python2.7/encodings/punycode.pyRs(RIRJtFalseR(((s./usr/local/lib/python2.7/encodings/punycode.pyRKstIncrementalDecodercBseZedZRS(cCs2|jdkr"td|jnt||jS(NR2RFRGsUnsupported error handling (R2RFRG(R7R4RB(RDRERL((s./usr/local/lib/python2.7/encodings/punycode.pyRHs(RIRJRMRH(((s./usr/local/lib/python2.7/encodings/punycode.pyRNstStreamWritercBseZRS((RIRJ(((s./usr/local/lib/python2.7/encodings/punycode.pyROstStreamReadercBseZRS((RIRJ(((s./usr/local/lib/python2.7/encodings/punycode.pyRPscCs@tjdddtjdtjdtdtdtdtS(	NtnametpunycodeRRHtincrementalencodertincrementaldecodertstreamwritertstreamreader(	tcodecst	CodecInfoRCRRHRKRNRORP(((s./usr/local/lib/python2.7/encodings/punycode.pytgetregentrys	(t__doc__RWRRRRRR R#R'R.R1R:R>RBRCRKRNRORPRY(((s./usr/local/lib/python2.7/encodings/punycode.pyt<module>s(	
					
						

Zerion Mini Shell 1.0