HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/__pycache__/pprint.cpython-35.pyc


Fa|Q
@sadZddlZddlZddlZddlZddlm	Z
dddddd	gZdd
dddd
ddZd
dddd
ddZ
ddZddZddZGdddZddZGdd	d	ZddZeeeeeeeeedhZddZdddZ ddZ!e"d kr]e dS)!a/Support to pretty-print lists, tuples, & dictionaries recursively.

Very simple, but useful, especially in debugging data structures.

Classes
-------

PrettyPrinter()
    Handle pretty-printing operations onto a stream using a configured
    set of formatting parameters.

Functions
---------

pformat()
    Format a Python object into a pretty-printed representation.

pprint()
    Pretty-print a Python object to a stream [default is sys.stdout].

saferepr()
    Generate a 'standard' repr()-like value, but protect against recursive
    data structures.

N)StringIOpprintpformat
isreadableisrecursivesaferepr
PrettyPrinterPcompactFcCs8td|d|d|d|d|}|j|dS)zAPretty-print a Python object to a stream [default is sys.stdout].streamindentwidthdepthrN)rr)objectrr
rrrZprinterr/usr/lib/python3.5/pprint.pyr/s	c	Cs(td|d|d|d|j|S)z<Format a Python object into a pretty-printed representation.r
rrr)rr)rr
rrrrrrr7scCst|idddS)z=Version of repr() which can handle recursive data structures.Nr)
_safe_repr)rrrrr<scCst|idddS)z4Determine if saferepr(object) is readable by eval().Nrr	)r)rrrrr@scCst|idddS)z8Determine if object requires a recursive representation.Nr)r)rrrrrDsc@s7eZdZdZdgZddZddZdS)	_safe_keyaUHelper function for key functions when sorting unorderable objects.

    The wrapped-object will fallback to a Py2.x style comparison for
    unorderable types (sorting first comparing the type name and then by
    the obj ids).  Does not work recursively, so dict.items() must have
    _safe_key applied to both the key and the value.

    objcCs
||_dS)N)r)selfrrrr__init__Tsz_safe_key.__init__cCssy|j|jkSWnXtk
rntt|jt|jftt|jt|jfkSYnXdS)N)r	TypeErrorstrtypeid)rotherrrr__lt__Ws

!z_safe_key.__lt__N)__name__
__module____qualname____doc__	__slots__rrrrrrrHs	rcCst|dt|dfS)z&Helper function for comparing 2-tuplesrr	)r)trrr_safe_tuple^sr%c@sXeZdZddddddddZdd	Zd
dZdd
ZddZddZiZ	ddZ
e
e	ej<ddZ
e
e	ejj<ddZee	ej<ddZee	ej<ddZee	ej<ee	ej<ddZee	ej<ddZee	ej<d d!Zee	ej<d"d#Zee	ejj<d$d%Z d&d'Z!d(d)Z"d*d+Z#d,d-Z$e$e	ej%j<d.d/Z&e&e	ej'j<d0d1Z(e(e	ej)j<d2d3Z*e*e	ej+j<d4d5Z,e,e	ej-j<d6d7Z.e.e	ej/j<d8d9Z0e0e	ej1j<dS):rr	r
NrFcCst|}t|}|dkr0td|dk	rT|dkrTtd|sftd||_||_||_|dk	r||_ntj|_t||_	dS)aDHandle pretty printing operations onto a stream using a set of
        configured parameters.

        indent
            Number of spaces to indent for each level of nesting.

        width
            Attempted maximum number of columns in the output.

        depth
            The maximum depth to print out nested structures.

        stream
            The desired output stream.  If omitted (or false), the standard
            output stream available at construction will be used.

        compact
            If true, several items will be combined in one line.

        rzindent must be >= 0Nzdepth must be > 0zwidth must be != 0)
int
ValueError_depth_indent_per_level_width_stream_sysstdoutbool_compact)rr
rrrrrrrrcs			zPrettyPrinter.__init__cCs3|j||jddid|jjddS)Nr
)_formatr+write)rrrrrrszPrettyPrinter.pprintcCs/t}|j||ddid|jS)Nr)	_StringIOr1getvalue)rrZsiorrrrs	zPrettyPrinter.pformatcCs|j|idddS)Nrr)format)rrrrrrszPrettyPrinter.isrecursivecCs,|j|idd\}}}|o+|S)Nr)r5)rrsreadable	recursiverrrrs!zPrettyPrinter.isreadablec	Cs-t|}||krA|jt|d|_d|_dS|j|||}|j||}	t||	kr|jj	t
|jd}
|
dk	rd||<|
|||||||d||=dSt|t
rd||<|j||||||d||=dS|j|dS)NTFr	)rr2
_recursion
_recursive	_readable_reprr*len	_dispatchgetr__repr__
isinstancedict_pprint_dict)rrrr
	allowancecontextlevelobjidrep	max_widthprrrr1s,		
 
zPrettyPrinter._formatc
Cs|j}|d|jdkr7||jddt|}|rt|jdt}	|j|	|||d|||ddS)N{r	 key})r2r)r=sorteditemsr%_format_dict_items)
rrrr
rDrErFr2ZlengthrPrrrrCs	

zPrettyPrinter._pprint_dictcCst|s#|jt|dS|j}|j|jd|jt|j||t|jd|d|||jddS)N(r	))r=r2repr	__class__rr1listrP)rrrr
rDrErFclsrrr_pprint_ordered_dicts	
z"PrettyPrinter._pprint_ordered_dictcCs>|jd|j||||d|||jddS)N[r	])r2
_format_items)rrrr
rDrErFrrr_pprint_lists

zPrettyPrinter._pprint_listcCsb|jdt|dkr%dnd}|j||||t||||j|dS)NrRr	z,)rS)r2r=r[)rrrr
rDrErFendcharrrr
_pprint_tuples


zPrettyPrinter._pprint_tuplec	Cst|s#|jt|dS|j}|tkrN|jdd}n1|j|jdd}|t|jd7}t|dt}|j||||t||||j|dS)NrKrNz({z})r	rM)	r=r2rTrUsetrrOrr[)	rrrr
rDrErFtypr]rrr_pprint_sets	
	
zPrettyPrinter._pprint_setcCsj|j}t|s)|t|dSg}|jd}	|dkr^|d7}|d7}|j|}
}xct|	D]U\}}
t|
}|t|	dkr|
|8}
t||
kr|j|q|tjd|
}|st	|d
st	|j
|}d}xt|D]\}}||}|t|dkrt|t|	dkrt||8}tt||kr|r|jt||}q(|}q(W|r||jt|q|Wt|dkr||dS|dkr|dxBt|D]4\}}|dkrB|dd|||qW|dkrf|d	dS)NTr	z\S*\s*rRrr0rLrS)r2r=rT
splitlinesr*	enumerateappendrefindallAssertionErrorpop)rrrr
rDrErFr2ZchunkslinesZ
max_width1rIilinerHpartsZ
max_width2currentjpart	candidaterrr_pprint_strsX	




,
	


zPrettyPrinter._pprint_strcCs|j}t|dkr/|t|dS|dk}|r_|d7}|d7}|dd}	xIt||j||D].}
||	||
|	sdd|}	qW|r|ddS)Nr	rRrbr0rLrS)r2r=rT_wrap_bytes_reprr*)rrrr
rDrErFr2ZparensdelimrHrrr
_pprint_bytes's"	


 

zPrettyPrinter._pprint_bytescCsO|j}|d|jt|||d|d||d|ddS)Nz
bytearray(
r	rS)r2rwbytes)rrrr
rDrErFr2rrr_pprint_bytearray<s
	
zPrettyPrinter._pprint_bytearraycCsH|jd|j|j||d|d|||jddS)Nz
mappingproxy(
r	rS)r2r1copy)rrrr
rDrErFrrr_pprint_mappingproxyEs
 
z"PrettyPrinter._pprint_mappingproxycCs|j}||j7}dd|}t|d}	xt|D]\}
\}}|
|	k}
|j|||}|||d|j|||t|d|
r|nd|||
sA||qAWdS)Nz,
rLr	z: r)r2r)r=rer<r1)rrPrr
rDrErFr2delimnlZ
last_indexrlrMentlastrHrrrrQMs	



z PrettyPrinter._format_dict_itemscCs|j}||j7}|jdkr:||jdddd|}d}	|j|d}
}t|}yt|}
Wntk
rdSYnXd}x|s|
}yt|}
Wn,tk
rd}||8}|
|8}
YnX|jrk|j|||}t|d}|
|kr8|}
|	r8|}	|
|krk|
|8}
||	d}	||q||	|}	|j	||||r|nd||qWdS)	Nr	rLz,
rbFTrz, )
r2r)r*iternext
StopIterationr/r<r=r1)rrPrr
rDrErFr2r~rvrrIitZnext_entrrrHwrrrr[^sN	

		

	



zPrettyPrinter._format_itemscCsL|j||j|j|\}}}|s9d|_|rHd|_|S)NFT)r5r|r(r;r:)rrrErFrTr7r8rrrr<s		zPrettyPrinter._reprcCst||||S)zFormat object for a specific context, returning a string
        and flags indicating whether the representation is 'readable'
        and whether the object represents a recursive construct.
        )r)rrrE	maxlevelsrFrrrr5szPrettyPrinter.formatc	Cst|s#|jt|dS|j|j||}|j}|t|jd7}|jd|j|d|f|j||||d|||jddS)Nr	z	%s(%s,
%srLrS)r=r2rTr<default_factoryrUrrC)	rrrr
rDrErFZrdfrWrrr_pprint_default_dicts	! z"PrettyPrinter._pprint_default_dictc	Cst|s#|jt|dS|j}|j|jd|jdkrg|j|jdd|j}|j|||t|jd|d|||jddS)Nz({r	rLrz}))r=r2rTrUrr)most_commonrQ)	rrrr
rDrErFrWrPrrr_pprint_counters	
zPrettyPrinter._pprint_counterc
Cst|js&|jt|dS|j}|j|jd|t|jd7}xt|jD]\}}	|t|jdkr|j|	|||d|||jdqj|j|	||d|||jdd|qjWdS)NrRr	rSz,
rL)r=mapsr2rTrUrrer1)
rrrr
rDrErFrWrlmrrr_pprint_chain_maps	 zPrettyPrinter._pprint_chain_mapc	Cst|s#|jt|dS|j}|j|jd|t|jd7}|jd|jdkr|j||||d|||jdnO|j|||d|||j|j||}|jdd||fdS)NrRr	rYrz])z],
%smaxlen=%s)rL)r=r2rTrUrmaxlenr[r<)	rrrr
rDrErFrWZrmlrrr
_pprint_deques	


zPrettyPrinter._pprint_dequecCs'|j|j|||||ddS)Nr	)r1data)rrrr
rDrErFrrr_pprint_user_dictszPrettyPrinter._pprint_user_dictcCs'|j|j|||||ddS)Nr	)r1r)rrrr
rDrErFrrr_pprint_user_listszPrettyPrinter._pprint_user_listcCs'|j|j|||||ddS)Nr	)r1r)rrrr
rDrErFrrr_pprint_user_stringsz!PrettyPrinter._pprint_user_string)2rr r!rrrrrr1r>rCrBr@rX_collectionsOrderedDictr\rVr^tuplerar_	frozensetrsrrwryrz	bytearrayr}_typesMappingProxyTyperQr[r<r5rdefaultdictrCounterrChainMaprdequerUserDictrUserListr
UserStringrrrrrbsZ&




1


)	cCsUt|}|tkr+t|ddfSt|dd}t|tr|tjkr|sedSt|}|r||krdd||kfS||krt|ddfSd||<d}d}g}	|	j	}
|d7}t
}t|jdt
}x|D]\}
}||
|||\}}}|||||\}}}|
d||f|ot|ot|}|s|r	d}q	W||=d	d
j|	||fSt|tr|tjkst|tr,|tjkr,t|tr|sdSd}n+t|dkr'd
}n|s1dSd}t|}|rl||krl|dd||kfS||krt|ddfSd||<d}d}g}	|	j	}
|d7}xN|D]F}t
||||\}}}|
||sd}|rd}qW||=|d
j|	||fSt|}||oN|jddfS)NTFr@{}z{...}r	rMz%s: %sz{%s}z, []z[%s]z(%s,)()z(%s)z...<)rTF)rTF)rTF)r_builtin_scalarsrTgetattr
issubclassrBr@rr9rfrrOrPr%joinrVrr=
startswith)rrErrFr`rrGr7r8Z
componentsrfrrPkvZkreprZ	kreadableZkrecurZvreprZ	vreadableZvrecurr5oZoreprZ	oreadableZorecurrHrrrrs|
	

		
	



rcCsdt|jt|fS)Nz<Recursion on %s with id=%s>)rrr)rrrrr91sr9cCsddl}|dkrCddddgddd	d
ifgd}t}|j}t|idd|j}|j||j}td||td
||dS)Nrstringr	rrtiz_safe_repr:zpformat:)r	r)timerrrprint)rrrJZt1Zt2Zt3rrr
_perfcheck6s+	
rccsd}t|dd}xtdt|dD]r}|||d}||}||krm||8}tt||kr|rt|V|}q3|}q3W|rt|VdS)Nrtr)r=rangerT)rrrDrorrlrqrrrrrruCs

	
ru__main__)#r"collectionsrrgsysr,typesriorr3__all__rrrrrrr%rrrrryrr&floatcomplexr.rrr9rrurrrrr<module>#s2	D