Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/pickle.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c	@s�dZdZddlTddlmZddlmZmZmZddlZddl	Z	ddl
Z
ddlZddd	d
ddd
ddg	ZdZ
dddddgZdZejZdefd��YZdefd��YZd	efd��YZdefd��YZyddlmZWnek
rBeZnXyeWnek
rdeZnXdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d%Z&d&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-d-Z.d.Z/d/Z0d0Z1d1Z2d2Z3d3Z4d4Z5d5Z6d6Z7d7Z8d8Z9d9Z:d:Z;d;Z<d<Z=d=Z>d>Z?d?Z@d@ZAdAZBdBZCdCZDdDZEdEZFdFZGdGZHdHZIdIZJdJZKdKZLdLZMdMZNdNZOdOZPdPZQdQZRdRZSeCeMeNeOgZTejUgeV�D]ZWejXdSeW�r�W^q��[Wd
fdT��YZYdU�ZZiZ[dV�Z\dfdW��YZ]dXfdY��YZ^ddl_Z`dZ�Zad[�Zbydd\lcmdZdWn!ek
r�dd\ldmdZdnXed]�Zeed^�Zfd_�Zgd`�Zda�Zheidbkr�h�ndS(cs�Create portable serialized representations of Python objects.

See module cPickle for a (much) faster implementation.
See module copy_reg for a mechanism for registering custom picklers.
See module pickletools source for extensive comments.

Classes:

    Pickler
    Unpickler

Functions:

    dump(object, file)
    dumps(object) -> string
    load(file) -> object
    loads(string) -> object

Misc variables:

    __version__
    format_version
    compatible_formats

s$Revision: 72223 $i�(t*(tdispatch_table(t_extension_registryt_inverted_registryt_extension_cacheNtPickleErrort
PicklingErrortUnpicklingErrortPicklert	Unpicklertdumptdumpstloadtloadss2.0s1.0s1.1s1.2s1.3icBseZdZRS(s6A common base class for the other pickling exceptions.(t__name__t
__module__t__doc__(((s/sys/lib/python2.7/pickle.pyR:scBseZdZRS(s]This exception is raised when an unpicklable object is passed to the
    dump() method.

    (RRR(((s/sys/lib/python2.7/pickle.pyR>scBseZdZRS(sThis exception is raised when there is a problem unpickling an object,
    such as a security violation.

    Note that other exceptions may also be raised during unpickling, including
    (but not necessarily limited to) AttributeError, EOFError, ImportError,
    and IndexError.

    (RRR(((s/sys/lib/python2.7/pickle.pyREst_StopcBseZd�ZRS(cCs
||_dS(N(tvalue(tselfR((s/sys/lib/python2.7/pickle.pyt__init__Ss(RRR(((s/sys/lib/python2.7/pickle.pyRRs(tPyStringMapt(t.t0t1t2tFtItJtKtLtMtNtPtQtRtStTtUtVtXtatbtctdt}tetgthtitjtlt]totptqtrtsttt)tutGsI01
sI00
s������������[A-Z][A-Z0-9_]+$cBseZdd�Zd�Zd�Zd�Zejd�Z	ejd�Z
d�Zd�Zd�Z
ddddd	�ZiZd
�Zeee<d�Zeee<ejd�Zeee<ejd
�Zeee<ejd�Zeee<ejd�Zeee<ejd�Zeee<eekrLejd�Zeee<nd�Zeee<d�Z d�Z!e!ee"<dZ#d�Z$d�Z%e%ee&<e'dk	r�e%ee'<nd�Z(d�Z)e)ee*<dejd�Z+e+ee,<e+ee-<e+ee.<e+ee/<RS(cCs�|dkrd}n|dkr*t}n/d|koAtknsYtdt��n|j|_i|_t|�|_|dk|_d|_dS(s8This takes a file-like object for writing a pickle data stream.

        The optional protocol argument tells the pickler to use the
        given protocol; supported protocols are 0, 1, 2.  The default
        protocol is 0, to be backwards compatible.  (Protocol 0 is the
        only protocol that can be written to a file opened in text
        mode and read back successfully.  When using a protocol higher
        than 0, make sure the file is opened in binary mode, both when
        pickling and unpickling.)

        Protocol 1 is more efficient than protocol 0; protocol 2 is
        more efficient than protocol 1.

        Specifying a negative protocol version selects the highest
        protocol version supported.  The higher the protocol used, the
        more recent the version of Python needed to read the pickle
        produced.

        The file parameter must have a write() method that accepts a single
        string argument.  It can thus be an open file object, a StringIO
        object, or any other custom object that meets this interface.

        ispickle protocol must be <= %diN(	tNonetHIGHEST_PROTOCOLt
ValueErrortwritetmemotinttprototbintfast(Rtfiletprotocol((s/sys/lib/python2.7/pickle.pyR�s			cCs|jj�dS(sClears the pickler's "memo".

        The memo is the data structure that remembers which objects the
        pickler has already seen, so that shared or recursive objects are
        pickled by reference and not by value.  This method is useful when
        re-using picklers.

        N(RCtclear(R((s/sys/lib/python2.7/pickle.pyt
clear_memo�s	cCsJ|jdkr,|jtt|j��n|j|�|jt�dS(s7Write a pickled representation of obj to the open file.iN(RERBtPROTOtchrtsavetSTOP(Rtobj((s/sys/lib/python2.7/pickle.pyR
�s
cCsO|jr
dSt|j�}|j|j|��||f|jt|�<dS(sStore an object in the memo.N(RGtlenRCRBtputtid(RRPtmemo_len((s/sys/lib/python2.7/pickle.pytmemoize�s
	cCsI|jr7|dkr#tt|�St|d|�Sntt|�dS(Nis<is
(RFtBINPUTRMtLONG_BINPUTtPUTtrepr(RR2tpack((s/sys/lib/python2.7/pickle.pyRR�s
	cCsI|jr7|dkr#tt|�St|d|�Sntt|�dS(Nis<is
(RFtBINGETRMtLONG_BINGETtGETRY(RR2RZ((s/sys/lib/python2.7/pickle.pytgets
	c
Cs	|j|�}|dk	r,|j|�dS|jjt|��}|rh|j|j|d��dSt|�}|jj|�}|r�|||�dSt	j|�}|r�||�}n�yt
|t�}Wntk
r�d}nX|r|j
|�dSt|dd�}|r/||j�}n=t|dd�}|rS|�}ntd|j|f��t|�tkr�|j
||�dSt|�tk	r�td|��nt|�}	d|	ko�dkns�d|��n|jd	||�dS(
Nit
__reduce_ex__t
__reduce__sCan't pickle %r object: %rs%s must return string or tupleiis3Tuple returned by %s must have two to five elementsRP(t
persistent_idR?t	save_persRCR^RSRBttypetdispatchRt
issubclasstTypeTypet	TypeErrortsave_globaltgetattrRERRt
StringTypet	TupleTypeRQtsave_reduce(
RRPtpidtxR;tftreducetrvtisscR4((s/sys/lib/python2.7/pickle.pyRN
sR





cCsdS(N(R?(RRP((s/sys/lib/python2.7/pickle.pyRaMscCsE|jr&|j|�|jt�n|jtt|�d�dS(Ns
(RFRNRBt	BINPERSIDtPERSIDtstr(RRm((s/sys/lib/python2.7/pickle.pyRbQs	
c
Cs�t|t�std��nt|d�s<td��n|j}|j}|jdkr�|dd�dkr�d}	t|	d	�s�td
��n|dk	r�|	|j	k	r�td��n|d}||	�||�|t
�n||�||�|t�|dk	r,|j|�n|dk	rH|j
|�n|dk	rd|j|�n|dk	r�||�|t�ndS(
Ns$args from reduce() should be a tuplet__call__s#func from reduce should be callableiRtt
__newobj__it__new__s+args[0] from __newobj__ args has no __new__s0args[0] from __newobj__ args has the wrong classi(t
isinstanceRkRthasattrRNRBRERiR?t	__class__tNEWOBJtREDUCERUt_batch_appendst_batch_setitemstBUILD(
Rtfunctargststatet	listitemst	dictitemsRPRNRBtcls((s/sys/lib/python2.7/pickle.pyRlYs<		'








cCs|jt�dS(N(RBtNONE(RRP((s/sys/lib/python2.7/pickle.pyt	save_none�scCsH|jdkr+|j|r!tp$t�n|j|r=tp@t�dS(Ni(RERBtNEWTRUEtNEWFALSEtTRUEtFALSE(RRP((s/sys/lib/python2.7/pickle.pyt	save_bool�scCs�|jr�|dkrq|dkr<|jtt|��dS|dkrq|jdt|d@|d?f�dSn|d?}|dks�|dkr�|jt|d|��dSn|jtt|�d	�dS(
Nii�i�s%c%c%ciii�s<is
(RFRBtBININT1RMtBININT2tBININTtINTRY(RRPRZt	high_bits((s/sys/lib/python2.7/pickle.pytsave_int�s	"
cCs�|jdkrst|�}t|�}|dkrQ|jtt|�|�n|jt|d|�|�dS|jtt|�d�dS(Niis<is
(	REtencode_longRQRBtLONG1RMtLONG4tLONGRY(RRPRZtbytestn((s/sys/lib/python2.7/pickle.pyt	save_long�scCsE|jr&|jt|d|��n|jtt|�d�dS(Ns>ds
(RFRBtBINFLOATtFLOATRY(RRPRZ((s/sys/lib/python2.7/pickle.pyt
save_float�s	cCs�|jr`t|�}|dkr?|jtt|�|�q{|jt|d|�|�n|jtt|�d�|j|�dS(Nis<is
(	RFRQRBtSHORT_BINSTRINGRMt	BINSTRINGtSTRINGRYRU(RRPRZR�((s/sys/lib/python2.7/pickle.pytsave_string�s	!cCs�|jrE|jd�}t|�}|jt|d|�|�nB|jdd�}|jdd�}|jt|jd�d�|j|�dS(Nsutf-8s<is\s\u005cs
s\u000asraw-unicode-escape(RFtencodeRQRBt
BINUNICODEtreplacetUNICODERU(RRPRZtencodingR�((s/sys/lib/python2.7/pickle.pytsave_unicode�s	!cCs,|j�}|jr�|r-|jd�}nt|�}|dkrj|rj|jtt|�|�q|d|�}|r�|jt||�q|jt||�nl|r|j	dd�}|j	dd�}|jd�}|jt
|d�n|jtt|�d�|j
|�dS(	Nsutf-8is<is\s\u005cs
s\u000asraw-unicode-escape(t	isunicodeRFR�RQRBR�RMR�R�R�R�R�RYRU(RRPRZtunicodeR4R:((s/sys/lib/python2.7/pickle.pyR��s$	c	Cs�|j}|j}t|�}|dkrO|r=|t�n|tt�dS|j}|j}|dkr�dkr�|D]}||�q�Wt|�|kr�|j	|t|�d�}|t
||�n|t|�|j|�dS|t�x|D]}||�qWt|�|kr||j	|t|�d�}|rb|t
|�n|t
|d|�dS|jt�|j|�dS(Niiii(RBRERQtEMPTY_TUPLEtMARKtTUPLERNRCRSR^tPOPt_tuplesize2codeRUtPOP_MARK(	RRPRBRER�RNRCtelementR^((s/sys/lib/python2.7/pickle.pyt
save_tuples<		
		




cCs|jt�dS(N(RBR�(RRP((s/sys/lib/python2.7/pickle.pytsave_empty_tupleLscCsQ|j}|jr|t�n|tt�|j|�|jt|��dS(N(RBRFt
EMPTY_LISTR�tLISTRURtiter(RRPRB((s/sys/lib/python2.7/pickle.pyt	save_listOs		

i�c	Cs$|j}|j}|jsDx"|D]}||�|t�q"WdSt|j�}x�|dk	rg}xF|D]>}y|j�}|j|�Wqot	k
r�d}PqoXqoWt
|�}|dkr�t�x|D]}||�q�W|t�qV|rV||d�|t�qVqVWdS(Nii(
RNRBRFtAPPENDtxranget
_BATCHSIZER?tnexttappendt
StopIterationRQR�tAPPENDS(	RtitemsRNRBRnR9ttmpR2R�((s/sys/lib/python2.7/pickle.pyR`s4			



	


cCsQ|j}|jr|t�n|tt�|j|�|j|j��dS(N(RBRFt
EMPTY_DICTR�tDICTRUR�t	iteritems(RRPRB((s/sys/lib/python2.7/pickle.pyt	save_dict�s		

c
CsT|j}|j}|jsTx2|D]*\}}||�||�|t�q"WdSt|j�}x�dk	rOg}x@|D]8}y|j|j��Wqt	k
r�d}PqXqWt
|�}	|	dkr|t�x(|D] \}}||�||�q�|t�qf|	rf|d\}}||�||�|t�qfqfWdS(Nii(
RNRBRFtSETITEMR�R�R?R�R�R�RQR�tSETITEMS(
RR�RNRBtktvR9R�R2R�((s/sys/lib/python2.7/pickle.pyR��s:			



	




c
CsD|j}|j}|j}|j}t|d�rY|j�}t|�t||�nd}|t�|j	r�||�x|D]}||�q�W|t
�n;x|D]}||�q�W|t|jd|j
d�|j|�y
|j}Wntk
r|j}	nX|�}	t|	|�||	�|t�dS(Nt__getinitargs__s
((R|RCRBRNR{R�RQt_keep_aliveR�RFtOBJtINSTRRRUt__getstate__tAttributeErrort__dict__R�(
RRPR�RCRBRNR�targtgetstatetstuff((s/sys/lib/python2.7/pickle.pyt	save_inst�s6				

	



 



	

c
Cs�|j}|j}|dkr*|j}nt|dd�}|dkrZt||�}ny*t|�tj|}t||�}Wn3t	t
tfk
r�td|||f��n)X||k	r�d|||f��n|j
dkr{tj||f�}	|	r{|	dkr/|tt|	��nE|	dkr]|dt|	d@|	d?f�n|t|d	|	��dSn|t|d
|d
�|j|�dS(NRs(Can't pickle %r: it's not found as %s.%ss2Can't pickle %r: it's not the same object as %s.%sii�i�s%c%c%cis<is
(RBRCR?RRitwhichmodulet
__import__tsystmodulestImportErrortKeyErrorR�RRERR^tEXT1RMtEXT2tEXT4tGLOBALRU(
RRPtnameRZRBRCtmoduletmodtklasstcode((s/sys/lib/python2.7/pickle.pyRh�s<		

"N(0RRR?RRKR
RUtstructRZRRR^RNRaRbRlRdR�tNoneTypeR�tboolR�tIntTypeR�tLongTypeR�t	FloatTypeR�RjR�tUnicodeTypeR�RkR�R�tListTypeR�RR�tDictionaryTypeRR�R�tInstanceTypeRht	ClassTypetFunctionTypetBuiltinFunctionTypeRf(((s/sys/lib/python2.7/pickle.pyR�s`$			
		@		N	
	









	3
		
	 	

	#	&
(


cCsFy|t|�j|�Wn$tk
rA|g|t|�<nXdS(sMKeeps a reference to the object x in the memo.

    Because we remember objects by their id, we have
    to assure that possibly temporary objects are kept
    alive by referencing them.
    We store a reference at the id of the memo, which should
    normally not be used unless someone tries to deepcopy
    the memo itself...
    N(RSR�R�(RnRC((s/sys/lib/python2.7/pickle.pyR�	s

cCs�t|dd�}|dk	r"|S|tkr6t|Sx]tjj�D]F\}}|dkrdqFn|dkrFt||d�|krFPqFqFWd}|t|<|S(s�Figure out the module in which a function occurs.

    Search sys.modules for the module.
    Cache in classmap.
    Return a module name.
    If the function cannot be found, return "__main__".
    Rt__main__N(RiR?tclassmapR�R�R�(R�tfuncnameR�R�R�((s/sys/lib/python2.7/pickle.pyR�s	$
cBsLeZd�Zd�Zd�ZiZd�Zeed<d�Zeee<d�Z	e	ee
<d�Zeee<d�Z
e
ee<d	�Zeee<d
�Zeee<d�Zeee<d�Zeee<d
�Zeee<d�Zeee<d�Zeee<d�Zeee<d�Zeee <d�Z!e!ee"<e#j$d�Z%e%ee&<d�Z'e'ee(<d�Z)e)ee*<d�Z+e+ee,<d�Z-e-ee.<d�Z/e/ee0<d�Z1e1ee2<d�Z3e3ee4<d�Z5e5ee6<d�Z7e7ee8<d�Z9e9ee:<d�Z;e;ee<<d�Z=e=ee><d �Z?e?ee@<d!�ZAeAeeB<d"�ZCd#�ZDeDeeE<d$�ZFeFeeG<d%�ZHeHeeI<d&�ZJeJeeK<d'�ZLeLeeM<d(�ZNeNeeO<d)�ZPePeeQ<d*�ZRd+�ZSd,�ZTeTeeU<d-�ZVeVeeW<d.�ZXeXeeY<d/�ZZeZee[<d0�Z\e\ee]<d1�Z^e^ee_<d2�Z`e`eea<d3�Zbebeec<d4�Zdedeee<d5�Zfefeeg<d6�Zheheei<d7�Zjejeek<d8�Zleleem<d9�Zneneeo<d:�Zpepeeq<d;�Zrerees<d<�Zteteeu<RS(=cCs%|j|_|j|_i|_dS(sThis takes a file-like object for reading a pickle data stream.

        The protocol version of the pickle is detected automatically, so no
        proto argument is needed.

        The file-like object must have two methods, a read() method that
        takes an integer argument, and a readline() method that requires no
        arguments.  Both methods should return a string.  Thus file-like
        object can be a file object opened for reading, a StringIO object,
        or any other custom object that meets this interface.
        N(treadlinetreadRC(RRH((s/sys/lib/python2.7/pickle.pyR=scCsxt�|_g|_|jj|_|j}|j}y$x|d�}|||�q<Wntk
rs}|jSXdS(s�Read a pickled object representation from the open file.

        Return the reconstituted object hierarchy specified in the file.
        iN(tobjecttmarktstackR�R�RdRR(RR�Rdtkeytstopinst((s/sys/lib/python2.7/pickle.pyRMs			cCsG|j}|j}t|�d}x|||k	rB|d}q%W|S(Ni(R�R�RQ(RR�R�R�((s/sys/lib/python2.7/pickle.pytmarkerfs		cCs
t�dS(N(tEOFError(R((s/sys/lib/python2.7/pickle.pytload_eofosRwcCsEt|jd��}d|ko,dknsAtd|�ndS(Niiisunsupported pickle protocol: %d(tordR�RA(RRE((s/sys/lib/python2.7/pickle.pyt
load_protosscCs*|j�d }|j|j|��dS(Ni�(R�R�tpersistent_load(RRm((s/sys/lib/python2.7/pickle.pytload_persidyscCs)|jj�}|j|j|��dS(N(R�tpopR�R�(RRm((s/sys/lib/python2.7/pickle.pytload_binpersid~scCs|jd�dS(N(R�R?(R((s/sys/lib/python2.7/pickle.pyt	load_none�scCs|jt�dS(N(R�tFalse(R((s/sys/lib/python2.7/pickle.pyt
load_false�scCs|jt�dS(N(R�tTrue(R((s/sys/lib/python2.7/pickle.pyt	load_true�scCs|j�}|tdkr%t}nI|tdkr>t}n0yt|�}Wntk
rmt|�}nX|j|�dS(Ni(	R�R�RR�RRDRAtlongR�(Rtdatatval((s/sys/lib/python2.7/pickle.pytload_int�s		
cCs$|jtd|jd���dS(NR2i(R�tmloadsR�(R((s/sys/lib/python2.7/pickle.pytload_binint�scCs |jt|jd���dS(Ni(R�R�R�(R((s/sys/lib/python2.7/pickle.pytload_binint1�scCs(|jtd|jd�d��dS(NR2it(R�RR�(R((s/sys/lib/python2.7/pickle.pytload_binint2�scCs$|jt|j�d d��dS(Ni�i(R�RR�(R((s/sys/lib/python2.7/pickle.pyt	load_long�scCs;t|jd��}|j|�}|jt|��dS(Ni(R�R�R�tdecode_long(RR�R�((s/sys/lib/python2.7/pickle.pyt
load_long1�scCs?td|jd��}|j|�}|jt|��dS(NR2i(RR�R�R(RR�R�((s/sys/lib/python2.7/pickle.pyt
load_long4�scCs!|jt|j�d ��dS(Ni�(R�tfloatR�(R((s/sys/lib/python2.7/pickle.pyt
load_float�scCs'|j|d|jd��d�dS(Ns>dii(R�R�(Rtunpack((s/sys/lib/python2.7/pickle.pyt
load_binfloat�scCs�|j�d }xrdD]a}|j|�rt|�dksN|j|�rZtd�n|t|�t|�!}PqqWtd�|j|jd��dS(Ni�s"'isinsecure string pickles
string-escape(R�t
startswithRQtendswithRAR�tdecode(RtrepR8((s/sys/lib/python2.7/pickle.pytload_string�s
"	cCs3td|jd��}|j|j|��dS(NR2i(RR�R�(RRQ((s/sys/lib/python2.7/pickle.pytload_binstring�scCs$|jt|j�d d��dS(Ni�sraw-unicode-escape(R�R�R�(R((s/sys/lib/python2.7/pickle.pytload_unicode�scCs<td|jd��}|jt|j|�d��dS(NR2isutf-8(RR�R�R�(RRQ((s/sys/lib/python2.7/pickle.pytload_binunicode�scCs/t|jd��}|j|j|��dS(Ni(R�R�R�(RRQ((s/sys/lib/python2.7/pickle.pytload_short_binstring�scCs1|j�}t|j|d�g|j|)dS(Ni(R�ttupleR�(RR�((s/sys/lib/python2.7/pickle.pyt
load_tuple�scCs|jjd�dS(N((R�R�(R((s/sys/lib/python2.7/pickle.pytload_empty_tuple�scCs|jdf|jd<dS(Ni�(R�(R((s/sys/lib/python2.7/pickle.pytload_tuple1�scCs(|jd|jdfg|jd)dS(Ni�i�(R�(R((s/sys/lib/python2.7/pickle.pytload_tuple2�scCs2|jd|jd|jdfg|jd)dS(Ni�i�i�(R�(R((s/sys/lib/python2.7/pickle.pytload_tuple3�scCs|jjg�dS(N(R�R�(R((s/sys/lib/python2.7/pickle.pytload_empty_list�scCs|jji�dS(N(R�R�(R((s/sys/lib/python2.7/pickle.pytload_empty_dictionary�scCs+|j�}|j|dg|j|)dS(Ni(R�R�(RR�((s/sys/lib/python2.7/pickle.pyt	load_list�scCs||j�}i}|j|d}xBtdt|�d�D](}||}||d}|||<q<W|g|j|)dS(Niii(R�R�trangeRQ(RR�R-R�R2R�R((s/sys/lib/python2.7/pickle.pyt	load_dicts
cCs�t|j|d�}|j|3d}|r�t|�tkr�t|d�r�yt�}||_d}Wq�tk
rq�Xn|s�y||�}Wq�tk
r�}td|j	t
|�ftj�d�q�Xn|j
|�dS(NiiR�sin constructor for %s: %si(R"R�RcR�R{t_EmptyClassR|tRuntimeErrorRgRRuR�texc_infoR�(RR�R�R�tinstantiatedRterr((s/sys/lib/python2.7/pickle.pyt_instantiates&
		

*cCsL|j�d }|j�d }|j||�}|j||j��dS(Ni�(R�t
find_classR2R�(RR�R�R�((s/sys/lib/python2.7/pickle.pyt	load_inst*scCs6|j�}|jj|d�}|j||�dS(Ni(R�R�RR2(RR�R�((s/sys/lib/python2.7/pickle.pytload_obj1scCs?|jj�}|jd}|j||�}||jd<dS(Ni�(R�RRy(RR�R�RP((s/sys/lib/python2.7/pickle.pytload_newobj8s
cCsC|j�d }|j�d }|j||�}|j|�dS(Ni�(R�R3R�(RR�R�R�((s/sys/lib/python2.7/pickle.pytload_global?scCs&t|jd��}|j|�dS(Ni(R�R�t
get_extension(RR�((s/sys/lib/python2.7/pickle.pyt	load_ext1FscCs.td|jd�d�}|j|�dS(NR2iR(RR�R8(RR�((s/sys/lib/python2.7/pickle.pyt	load_ext2KscCs*td|jd��}|j|�dS(NR2i(RR�R8(RR�((s/sys/lib/python2.7/pickle.pyt	load_ext4PscCs�g}tj||�}||k	r5|j|�dStj|�}|s]td|��n|j|�}|t|<|j|�dS(Nsunregistered extension code %d(RR^R�RRAR3(RR�tnilRPR�((s/sys/lib/python2.7/pickle.pyR8Us

cCs*t|�tj|}t||�}|S(N(R�R�R�Ri(RR�R�R�R�((s/sys/lib/python2.7/pickle.pyR3bs

cCs9|j}|j�}|d}||�}||d<dS(Ni�(R�R(RR�R�R�R((s/sys/lib/python2.7/pickle.pytload_reduceis
	
cCs|jd=dS(Ni�(R�(R((s/sys/lib/python2.7/pickle.pytload_popqscCs|j�}|j|3dS(N(R�R�(RR�((s/sys/lib/python2.7/pickle.pyt
load_pop_markuscCs|j|jd�dS(Ni�(R�R�(R((s/sys/lib/python2.7/pickle.pytload_dupzscCs"|j|j|j�d �dS(Ni�(R�RCR�(R((s/sys/lib/python2.7/pickle.pytload_get~scCs3t|jd��}|j|jt|��dS(Ni(R�R�R�RCRY(RR2((s/sys/lib/python2.7/pickle.pytload_binget�scCs7td|jd��}|j|jt|��dS(NR2i(RR�R�RCRY(RR2((s/sys/lib/python2.7/pickle.pytload_long_binget�scCs"|jd|j|j�d <dS(Ni�(R�RCR�(R((s/sys/lib/python2.7/pickle.pytload_put�scCs3t|jd��}|jd|jt|�<dS(Nii�(R�R�R�RCRY(RR2((s/sys/lib/python2.7/pickle.pytload_binput�scCs7td|jd��}|jd|jt|�<dS(NR2ii�(RR�R�RCRY(RR2((s/sys/lib/python2.7/pickle.pytload_long_binput�scCs0|j}|j�}|d}|j|�dS(Ni�(R�RR�(RR�Rtlist((s/sys/lib/python2.7/pickle.pytload_append�s	
cCsC|j}|j�}||d}|j||d�||3dS(Ni(R�R�textend(RR�R�RG((s/sys/lib/python2.7/pickle.pytload_appends�s
	cCs9|j}|j�}|j�}|d}|||<dS(Ni�(R�R(RR�RR�tdict((s/sys/lib/python2.7/pickle.pytload_setitem�s
	
cCsk|j}|j�}||d}x:t|dt|�d�D]}||d|||<q@W||3dS(Nii(R�R�R+RQ(RR�R�RKR2((s/sys/lib/python2.7/pickle.pyt
load_setitems�s	#c	Cs^|j}|j�}|d}t|dd�}|rE||�dSd}t|t�r{t|�dkr{|\}}n|r$y_|j}y1x*|j�D]\}}||t	|�<q�WWnt
k
r�|j|�nXWq$tk
r x.|j
�D]\}}t|||�q�$Xn|rZx-|j
�D]\}}t|||�q7WndS(Ni�t__setstate__i(R�RRiR?RzR"RQR�R�tinternRgtupdateR.R�tsetattr(	RR�R�tinsttsetstatet	slotstateR-R�R�((s/sys/lib/python2.7/pickle.pyt
load_build�s0	

!	

cCs|j|j�dS(N(R�R�(R((s/sys/lib/python2.7/pickle.pyt	load_mark�scCs|jj�}t|��dS(N(R�RR(RR((s/sys/lib/python2.7/pickle.pyt	load_stop�s(vRRRRR�RdR�R�RLRRtRRsRR�RR�RR�RR�R
R�RR�RR�RR�RR�RR�RR�R�RRR�RR�RR�RR�R R�R!R�R#R�R$R�R%tTUPLE1R&tTUPLE2R'tTUPLE3R(R�R)R�R*R�R,R�R2R4R�R5R�R6R}R7R�R9R�R:R�R;R�R8R3R=R~R>R�R?R�R@tDUPRAR]RBR[RCR\RDRXRERVRFRWRHR�RJR�RLR�RMR�RUR�RVR�RWRO(((s/sys/lib/python2.7/pickle.pyR	;s�				
	
	
	
	
	
	
	
	
	
	
	
	
	
	

	
	
	
	
	
	
	
	
	
	
	
	
	
		
		
	
	
	
	
	
	
	
		
	
	
	
	
	
	
	
	
	
	
	
	
	
	%
	
	R-cBseZRS((RR(((s/sys/lib/python2.7/pickle.pyR-�scCs�|dkrdS|dkr�t|�}d|jd�}t|�|}|d@rfd|d}qtt|dd�dkrtd	|d}qtn�|�}d|jd�}t|�|}|d@r�|d7}n|d
}|d|>7}t|�}d|jd�}t|�|}||krJdd
|||d}nt|dd�dkrtd|d}n|jd�r�|dd!}n
|d}tj|�}|ddd�S(s�Encode a long to a two's complement little-endian binary string.
    Note that 0L is a special case, returning an empty string, to save a
    byte in the LONG1 pickling context.

    >>> encode_long(0L)
    ''
    >>> encode_long(255L)
    '\xff\x00'
    >>> encode_long(32767L)
    '\xff\x7f'
    >>> encode_long(-256L)
    '\x00\xff'
    >>> encode_long(-32768L)
    '\x00\x80'
    >>> encode_long(-128L)
    '\x80'
    >>> encode_long(127L)
    '\x7f'
    >>>
    iRwiRit0x0iit0x00ilt0xRt0xffi�N(thexRRQRDt	_binasciit	unhexlify(Rntashext
njunkcharstnibblestnbitst
newnibblestbinary((s/sys/lib/python2.7/pickle.pyR��s:





cCspt|�}|dkrdStj|ddd��}t|d�}|ddkrl|d|d>8}n|S(	s\Decode a long from a two's complement little-endian binary string.

    >>> decode_long('')
    0L
    >>> decode_long("\xff\x00")
    255L
    >>> decode_long("\xff\x7f")
    32767L
    >>> decode_long("\x00\xff")
    -256L
    >>> decode_long("\x00\x80")
    -32768L
    >>> decode_long("\x80")
    -128L
    >>> decode_long("\x7f")
    127L
    ilNi�is�i(RQRathexlifyR(R	tnbytesRcR�((s/sys/lib/python2.7/pickle.pyR6s(tStringIOcCst||�j|�dS(N(RR
(RPRHRI((s/sys/lib/python2.7/pickle.pyR
YscCs)t�}t||�j|�|j�S(N(RkRR
tgetvalue(RPRIRH((s/sys/lib/python2.7/pickle.pyR\s	cCst|�j�S(N(R	R(RH((s/sys/lib/python2.7/pickle.pyRascCst|�}t|�j�S(N(RkR	R(RuRH((s/sys/lib/python2.7/pickle.pyR
dscCsddl}|j�S(Ni�(tdoctestttestmod(Rm((s/sys/lib/python2.7/pickle.pyt_testjsR�(jRt__version__ttypestcopy_regRRRRtmarshalR�R�tret__all__tformat_versiontcompatible_formatsR@R
Rt	ExceptionRRRRtorg.python.coreRR�R?R�t	NameErrorR�ROR�R�R[R�R�R�R�R�R�R�RtRsR~R�R�R�R�R�R�R�R�R�R�R�R]R[R�R\R�R�R�RXRVRWR�R�R�R�R�R�R�RLR}R�R�R�RXRYRZR�R�R�R�R�RItdirRntmatchRR�R�R�R	R-tbinasciiRaR�Rt	cStringIORkR
RRRoR(((s/sys/lib/python2.7/pickle.pyt<module>s�
		




5�`		�	B	
			

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].