AlkantarClanX12

Your IP : 3.139.108.99


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/pydoc.cpython-310.opt-2.pyc

o

6��f#��@s4	dgZdZdZdZddlZddlZddlZddlZddl	Zddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZddlmZd	d
�Zdd�Zd
d�Z dd�Z!dd�Z"dd�Z#dd�Z$dd�Z%dd�Z&dd�Z'dd�Z(dd �Z)e�*d!ej+�Z,d"d#�Z-d$d%�Z.d&d'�Z/d(d)�Z0d�d*d+�Z1d,d-�Z2d.d/�Z3d0d1�Z4d2d3�Z5ifd4d5�Z6Gd6d7�d7e7�Z8d8d9�Z9difd:d;�Z:Gd<d=�d=�Z;Gd>d?�d?e�Z<Gd@dA�dAe;�Z=GdBdC�dCe�Z>GdDdE�dEe;�Z?GdFdG�dGe?�Z@dHdI�aAdJdK�ZBdLdM�ZCdNdO�ZDdPdQ�ZEdRdS�ZFdTdU�ZGdVdW�ZHdXdY�ZId�dZd[�ZJe?�ZKe@�ZLe=�ZMd�d\d]�ZN		d�d_d`�ZO		d�dadb�ZPd�dcdd�ZQd�dfdg�ZRGdhdi�di�ZSeS�ZTGdjdk�dk�ZUdldm�ZVdndo�ZWd�dqdr�ZXd�dsdtdu�dvdw�ZYdxdy�ZZdzd{�Z[d|d}�Z\d~d�Z]e^d�k�r�e]�dSdS)��helpzKa-Ping Yee <ping@lfw.org>z26 February 2001z�Guido van Rossum, for an excellent programming language.
Tommy Burnette, the original creator of manpy.
Paul Prescod, for all his work on onlinehelp.
Richard Chamberlain, for the first implementation of textdoc.
�N)�deque)�Repr)�format_exception_onlycCs^	g}g}tjD]$}tj�|pd�}tj�|�}||vr,tj�|�r,|�|�|�|�q|S�N�.)�sys�path�os�abspath�normcase�isdir�append)�dirsZnormdirs�dirZnormdir�r�,/opt/alt/python310/lib64/python3.10/pydoc.py�pathdirsRs


�rcCst�|�ot|tj�S�N)�inspectZisclass�
isinstance�types�GenericAlias��objectrrr�_isclass^srcCsNtj�|j�}|dur
dS|j�d�dd�D]}t||�}qt|�s%dS|S)Nr���)r�modules�get�
__module__�__qualname__�split�getattrr)�func�cls�namerrr�
_findclassasr&c	Cs�t�|�r#|jj}|j}t|�rtt||d�d�|jur|}n�|j}n�t�|�r=|j}t	|�}|dus:t||�|ur<dSnqt�
|�r]|j}|j}t|�rY|jd||jkrY|}nU|j}nQt|t
�rz|j}|j}t	|�}|duswt||�|urydSn4t�|�s�t�|�r�|j}|j}t||�|ur�dSt�|�r�t|dd�}t|t�r�||vr�||SndS|jD]}z	tt||��}Wn	ty�Yq�w|dur�|Sq�dS)N�__func__r�	__slots__)r�ismethodr'�__name__�__self__rr"�	__class__�
isfunctionr&�	isbuiltinr r�property�fgetZismethoddescriptor�isdatadescriptor�__objclass__�ismemberdescriptor�dict�__mro__�
_getowndoc�AttributeError)�objr%�selfr$r#�slots�base�docrrr�_finddocks`

�

�
�
��r=cCsb	z%t�|d�}|durWdS|tur$t|�j}t|t�r$||kr$WdS|WSty0YdSw)N�__doc__)r�__getattribute__�typer>r�strr7)r8r<Ztypedocrrrr6�s
�r6c	CsP	t|�}|durzt|�}WnttfyYdSwt|t�s#dSt�|�Sr)r6r=r7�	TypeErrorrrArZcleandoc)rr<rrr�_getdoc�s�

rCcCs.	t|�p	t�|�}|rt�dd|���pdS)Nz^ *
�)rCrZgetcomments�re�sub�rstrip)r�resultrrr�getdoc�srIcCsh	|���d�}t|�dkr|ddfSt|�dkr-|d��s-|dd�|dd��fSdd�|�fS)N�
�rrD�)�stripr!�lenrG�join)r<�linesrrr�splitdoc�srQcCs$	|j}|j|kr|jd|}|Sr)r*r)r�modnamer%rrr�	classname�s

rScCs>	t�|�pt|�pt�|�pt�|�pt�|�pt�|�Sr)r�ismoduler�	isroutineZisframeZistracebackZiscoderrrr�isdata�s����rVcGs2	|r|d�|�|d��}|dd�}|s|S)NrKrrL)rOr!)�textZpairsrrr�replace�s�rXcCsZ	t|�|kr+td|dd�}td|d|�}|d|�d|t|�|d�S|S)Nr�rL�...)rN�max)rW�maxlenZpreZpostrrr�cram�s$r]z at 0x[0-9a-f]{6,16}(>+)$cCs	t�d|�S)Nz\1)�_re_stripidrF�rWrrr�stripid�sr`cCs>	t�|�rdSt�|�rt|dd�}t�|�p|duSdS)NTr+F)rr)r.r"rT)�fnr9rrr�_is_bound_method�s

rbcCs^i}t�|tj�D]\}}d||<q	|jD]	}|�t|��q|��D]	}t||�||<q#|S�NrK)r�
getmembersrU�	__bases__�update�
allmethods�keysr")�cl�methods�key�valuer;rrrrg�s

rgcCs:	g}g}|D]}||�r|�|�q|�|�q||fSr�r)�s�	predicateZyesZno�xrrr�_split_listsrqcCsZ	|dvrdS|�d�r|�d�rdS|�d�rt|d�rdS|dur'||vS|�d�S)N>�
__author__�__version__�
__cached__�__builtins__r r>r(�__package__�__credits__�__date__�__path__�__spec__�
__loader__r*r�__file__r�__rK�_�_fieldsT)�
startswith�endswith�hasattr)r%�allr8rrr�visiblenamesr�cCsZ	g}t�|�D]"\}}}}t�|�r!d}t|t�r!|jdur!d}|�||||f�q|S)N�data descriptor�readonly property)r�classify_class_attrsr1rr/�fsetr)r�resultsr%�kindr$rlrrrr�)s
r�cs\	t|dg��z
�fdd�t��D��Wntyi�Ynw�fdd�}|j|d�dS)Nrcsi|]\}}||t���qSr)rN)�.0�ir%)�fieldsrr�
<dictcomp>:�z#sort_attributes.<locals>.<dictcomp>cs��|dd�|dfS�Nr)r)�attr)�field_orderrr�<lambda>=sz!sort_attributes.<locals>.<lambda>�rk)r"�	enumeraterB�sort)�attrsrZkeyfuncr)r�r�r�sort_attributes4s�r�cCs<	tj�|�rdD]}tj�tj�|d|��rdSq	dS)N)z.pyz.pyc�__init__TF)r
r	r
�isfilerO)r	�extrrr�	ispackageBs�r�cCs�|��}|dd�dks|��s#|��}|sn|dd�dks|��r|��}|dd�dkr5|dd�}|dd�dkrk|dd�}|dd�dkrQ|dd�}|��s`|��}|s\n|��rU|�d�d	��}|Sd}|S)
NrK�#�zr"""rY�"""r�\r)�readlinerMr!)�file�linerHrrr�source_synopsisJs$���r�c
Cs.	t�|�j}|�|d�\}}|dus||kr�|�ttjj��r%tjj	}n|�ttjj
��r3tjj}nd}|durbzt�
|�}Wn
tyJYdSw|�t|�}Wd�n1s\wYn-|d|�}tjjd||d�}ztj�|�}	WnYdStjd=|	jr�|	j��dnd}||f||<|S)N�NNZ__temp__��loaderr)r
�stat�st_mtimerr��tuple�	importlib�	machinery�BYTECODE_SUFFIXES�SourcelessFileLoader�EXTENSION_SUFFIXES�ExtensionFileLoader�tokenize�open�OSErrorr��util�spec_from_file_location�
_bootstrap�_loadrrr>�
splitlines)
�filename�cache�mtimeZ
lastupdaterHZ
loader_clsr�r��spec�modulerrr�synopsis[s>

�
��

�r�c@seZdZ	dd�Zdd�ZdS)�ErrorDuringImportcCs||_|\|_|_|_dSr)r��excrl�tb)r9r��exc_inforrrr��szErrorDuringImport.__init__cCs|jj}d|j||jfS)Nzproblem in %s - %s: %s)r�r*r�rl)r9r�rrr�__str__�szErrorDuringImport.__str__N)r*rr r�r�rrrrr��sr�c	Cs�	tjj}t|d��}||�t|��k}Wd�n1swYtj�|�}tj�	|�\}}|r;tj
�||�}ntj
�||�}tjj
|||d�}ztj�|�WSt|t����)N�rbr�)r�r��MAGIC_NUMBERr��readrNr
r	�basename�splitext�_bootstrap_externalr��SourceFileLoaderr�r�r�r�rr�)	r	�magicr�Zis_bytecoder�r%r�r�r�rrr�
importfile�s�r�c	s	z/|r+�tjvr+�tjvr+�fdd�tjD�}�g|D]
}tj|||<tj|=qt��}Wn8t��\}}}}	�tjvrKttj�j|	��|turUt|j|	��t	|t
�rb|j�krbYdSt�t������d�dd�D]}
zt
||
�}Wqrty�YdSw|S)Ncsg|]}|��d�r|�qS)r)r�)r��m�r	rr�
<listcomp>�r�zsafeimport.<locals>.<listcomp>rrK)rr�builtin_module_names�
__import__r�r�r|�SyntaxErrorr��
issubclass�ImportErrorr%r!r"r7)r	�	forceloadr�Zsubsrkr�r�rlr��info�partrr�r�
safeimport�s,


r�c@sfeZdZej�ddejdd��Zddd�Z	ddd�Z
e
ZZZ
ZZZe�d	�fd
d�ZdS)
�Doc�
PYTHONDOCSz%https://docs.python.org/%d.%d/libraryNrLcGs�	||f|}z"t�|�r|j|�WSt|�r|j|�WSt�|�r(|j|�WSWn	ty2Ynwt�|�r=|j	|�S|j
|�Sr)rrT�	docmoduler�docclassrU�
docroutiner7r1�docdata�docother)r9rr%�argsrrr�document�s�
zDoc.documentcGs(	d|o	dt|�t|�jf}t|��)Nz.don't know how to document object%s of type %s� )�reprr@r*rB)r9rr%r��messagerrr�fail�s
�zDoc.failZstdlibcCs�	zt�|�}Wntyd}Ynwtj�d|j�}tj�|�}t	|t
t��rc|jdvs=|�|�rc|�tj�
|d��sc|jdvrc|�d�rUd�|�d�|j���}|Stj�
||j��d	�}|Sd}|S)
N�
(built-in)r�)
�errno�
exceptionsZgcZimp�marshal�posix�signalr�_threadZ	zipimportz
site-packages)z	xml.etreeztest.pydoc_mod)zhttp://zhttps://z
{}/{}.html�/�.html)r�
getabsfilerBr
�environrr�r	rrr@r*r�rO�formatrG�lower)r9rZbasedirr��doclocrrr�	getdocloc�s,�
��

��z
Doc.getdoclocr)r*rr r
r�rr�version_infor�r�r�r�r�r�r��docpropertyr��	sysconfigZget_pathr�rrrrr��s��

r�c@sFeZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�ZeZdd�Z	eZ
d
S)�HTMLReprcC�,t�|�d|_|_d|_d|_|_dS�N��
�d�rr��maxlist�maxtuple�maxdict�	maxstring�maxother�r9rrrr�
�
zHTMLRepr.__init__cCst|dddddd�S)N�&z&amp;�<z&lt;�>z&gt;)rX�r9rWrrr�escapeszHTMLRepr.escapecCst�||�Sr)rr��r9rrrrr��z
HTMLRepr.reprcCsZtt|�d�r dd�t|�j���}t||�r t||�||�S|�ttt	|��|j
��S�Nr*�repr_r~)r�r@rOr*r!r"r
r]r`r�r�r9rp�levelZ
methodnamerrr�repr1s

zHTMLRepr.repr1cCs^t||j�}t|�}d|vr%dt|dd�vr%d|d|�|�|dSt�dd|�|��S)Nr��\\rD�rrz-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)z<font color="#c040c0">\1</font>)r]rr�rXr
rErF�r9rpr�testZtestreprrrr�repr_strings�zHTMLRepr.repr_stringcCs:z|�ttt|��|j��WS|�d|jj�YS�Nz
<%s instance>)r
r]r`r�rr,r*�r9rprrrr�
repr_instance*szHTMLRepr.repr_instanceN)r*rr r�r
r�rr�repr_strrZrepr_unicoderrrrr�sr�c@seZdZ	e�ZejZejZdd�Zd0dd�Z		d1d	d
�Z	dd�Z
d
d�Zd2dd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdiiifdd�Zd3d d!�Zd4d"d#�Zddiifd$d%�Zd&d'�Zddiiidfd(d)�Zd5d*d+�ZeZd4d,d-�Zd3d.d/�ZdS)6�HTMLDoccC�	d||fS)Nz�<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: %s</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
%s
</body></html>r)r9�title�contentsrrr�page;s�zHTMLDoc.pagerDcCs	d|||||p	dfS)Na'
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="%s">
<td valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">&nbsp;<br>%s</font></td
><td align=right valign=bottom
><font color="%s" face="helvetica, arial">%s</font></td></tr></table>
    �&nbsp;r)r9r�fgcol�bgcolZextrasrrr�headingEs�zHTMLDoc.heading�Nr c	
Cs`	|dur
dd|d}d|||f}	|r!|	d||||f}	n	|	d|||f}	|	d|S)Nz<tt>r z</tt>z�<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="%s">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">%s</font></td></tr>
    zR
<tr bgcolor="%s"><td rowspan=2>%s</td>
<td colspan=2>%s</td></tr>
<tr><td>%s</td>z(
<tr><td bgcolor="%s">%s</td><td>%s</td>z'
<td width="100%%">%s</td></tr></table>r)
r9rr!r"r�widthZpreludeZ
marginaliaZgaprHrrr�sectionPs�
��zHTMLDoc.sectioncGs	d|}|j|g|�R�S)Nz<big><strong>%s</strong></big>)r&)r9rr�rrr�
bigsectionfszHTMLDoc.bigsectionc
Cs(	|�|���}t|dddddddd�	S)N�

z
 
r�r rJ�<br>
)r
�
expandtabsrXr	rrr�	preformatks
�zHTMLDoc.preformatr�cCs�	d}t|�|d|}t|�D],}|dd|}t|||||�D]}|t|�kr8||||�d}q&|d}qd|S)NrDrKz<td width="%d%%" valign=top>r�r)z</td>z7<table width="100%%" summary="list"><tr>%s</tr></table>)rN�range)r9�listr�ZcolsrH�rows�colr�rrr�multicolumnqs�
zHTMLDoc.multicolumncCsd|S)Nz<font color="#909090">%s</font>rr	rrr�grey}szHTMLDoc.greycGs,	|D]}||vrd|||fSq|S)N�<a href="%s">%s</a>r)r9r%Zdictsr4rrr�namelinks�zHTMLDoc.namelinkcCsP	|jtj�|j�}}t||�r#t||�|ur#d|j|t||�fSt||�S)Nz<a href="%s.html#%s">%s</a>)r*rrrrr�r"rS)r9rrRr%r�rrr�	classlink�s�
zHTMLDoc.classlinkcCs	d|j|jfS�Nz<a href="%s.html">%s</a>)r*rrrr�
modulelink�szHTMLDoc.modulelinkcCsT	|\}}}}|r|�|�S|rd||f}nd|}|r"d|}n|}d||fS)Nz
%s.%s.htmlz%s.htmlz"<strong>%s</strong>&nbsp;(package)r2)r1)r9Z
modpkginfor%r	r��shadowed�urlrWrrr�
modpkglink�s

zHTMLDoc.modpkglinkcCr)Nz<a href="file:%s">%s</a>r)r9r8r	rrr�filelink�szHTMLDoc.filelinkcCs�	|p|j}g}d}t�d�}	|�||�}	|	sn�|	��\}
}|�||||
���|	��\}}
}}}}|
rH||��dd�}|�d||f�ng|r\dt|�}|�d|||�f�nS|rpdt|�}|�d|||�f�n?|r�|||d	�d
kr�|�d|�	||��n'|�d|�n|||d	�d
kr�|�|�	||||��n	|�|�	||��|}q|�|||d���d
�
|�S)NrzJ\b((http|https|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?(\w+))T�"z&quot;r2z'http://www.rfc-editor.org/rfc/rfc%d.txtz)https://www.python.org/dev/peps/pep-%04d/rK�(zself.zself.<strong>%s</strong>rD)r
rE�compile�search�spanr�groupsrX�intr3rO)r9rWr
�funcs�classesrjr��here�pattern�match�start�endr�ZschemeZrfcZpepZselfdotr%r8rrr�markup�s>

�
zHTMLDoc.markupc
Cs�	d}|D]T}t|�td�urF|\}}|d}||�||�}|rA||fkrAg}|D]}	|�|�|	|��q*|dd�|�d}|d}qt|�tg�urY|d|�|||�}qd	|S)
NrDrz"<dt><font face="helvetica, arial">r<�, �)z
</font></dt>z
<dd>
%s</dd>
z
<dl>
%s</dl>
)r@r4rrO�
formattree)
r9�treerR�parentrH�entry�c�bases�parentsr;rrrrL�s&
��zHTMLDoc.formattreec#
s�	|j}z|j}Wntyd}Ynw|�d�}g}tt|�d�D]}|�dd�|d|d��||f�q$d�||dd��}	d|	}
zt�	|�}t
j�|�}��
||�}
Wntyhd}
Ynwg}t|d�r�t|j�}|dd�d	kr�|dd�d
kr�|dd���}|�d��|��t|d�r�|���t|j���|r�|
d
d�|�}
��|�}|dur�dt�}nd}��|
ddd|
|�}t�|tj�}gi}}t�|t�D]*\}}|dus�t�|�p�||u�rt|||��r|�||f�d|||<||<q�|D]@\}}|jD]7}|j|j}}tj �!|�}||k�rK|�rKt||��rKt"||�|u�rK||v�rK|d|||<||<�q�qgi}}t�|tj#�D]8\}}|du�srt�$|��srt�|�|u�r�t|||��r�|�||f�d|||<t�%|��r�||||<�q[g}t�|t&�D]\}}t|||��r�|�||f��q���'t(|��j)||�}|�o�d|}|d|}t|d��r�g}t*�+|j,�D]\}}} |�||| df��q�|�-���.|�j/�}!|��0ddd|!�}n|�r��.|�fdd��}!|��0ddd|!�}|�rId d!�|D�}"��1t�2|"d�|�g}!|D]\}}|!���3|||||���q*|��0d"dd#d$�|!��}|�rog}!|D]\}}|!���3|||||���qP|��0d%dd&d$�|!��}|�r�g}!|D]\}}|!���3||���qv|��0d'dd(d)�|!��}t|d*��r���'t|j4��j)�}!|��0d+dd|!�}t|d,��rƈ�'t|j5��j)�}!|��0d-dd|!�}|S).NrrKz5<a href="%s.html"><font color="#ffffff">%s</font></a>r�)<big><big><strong>%s</strong></big></big>r�rs��$Revision: �$z
version %srxz (%s)rJz-<br><a href="%(docloc)s">Module Reference</a>rD�#ffffff�#7799eez<a href=".">index</a><br>r�z.html#z#-z<tt>%s</tt>z
<p>%s</p>
ryrzPackage Contentsz#aa55cccs��|d�Src)r6��trrrr�9�z#HTMLDoc.docmodule.<locals>.<lambda>ZModulescS�g|]\}}|�qSrr�r�rkrlrrrr�>�z%HTMLDoc.docmodule.<locals>.<listcomp>ZClasses�#ee77aar�Z	Functionsz#eeaa77ZDataz#55aa55r)rrZAuthorrwZCredits)6r*�__all__r7r!r,rNrrOrr��urllib�parseZquoter:rBr�rArsrMr
rxr��localsr#rdrTr�	getmoduler�rerrrrr"rUr.r-rVrIrIr+�pkgutil�iter_modulesryr�r0r9r'rL�getclasstreer�rrrw)#r9rr%�mod�ignoredr��partsZlinksr�Z
linkedname�headr	r8r:r��versionr�rHrrCZcdictrkrlr;rRr�rBZfdict�datar<�modpkgs�importer�ispkgr�	classlistrrrr��s
�
��
�

 


�
�

��

������������zHTMLDoc.docmodulec	st	�j}|p|}�j}g}	|	j�G�fdd�d�}
|
��tt����}t|�dkrE����d�|D]
}�d��|�j	��q3�d���������fdd�}
����fd	d
�}��������fdd�}�fd
d�t
��D�}i�|D]2\}}}}d|d|�|<}zt�|�}Wn	ty�Ynwz|�|<Wqwt
y�Yqww|�r+|r�|���n|dd�t|�fdd��\}}�tjur҈tjur�|}q���ur�d}n	d����j	�}|d7}t|��|
d||dd��}|
d||dd��}|
d||dd��}|d||dd��}|d||d d��}|d!||d"d��}|}|s�d#�|	�}	||k�r<d$||f}nd%|||f}|�rag}|D]
}|���|�j	���qJ|d&d'�|�}d#}zt���}Wntt
f�yxd}Ynw|�r�t|�}|�r�|d(k�r�|��|�d)}t��}|�r�||�p�d#}��|�j����}|�o�d*|}��|d+d,|	d-|�S).Nc� eZdZdd�Z�fdd�ZdS)z(HTMLDoc.docclass.<locals>.HorizontalRulecS�
d|_dSr��Zneedonerrrrr�h�
z1HTMLDoc.docclass.<locals>.HorizontalRule.__init__c�|jr�d�d|_dS)Nz<hr>
rKrtr��pushrr�maybej�
z.HTMLDoc.docclass.<locals>.HorizontalRule.maybeN�r*rr r�ryrrwrr�HorizontalRuleg�r|rLz&<dl><dt>Method resolution order:</dt>
z<dd>%s</dd>
�</dl>
cs�t||�\}}|rE����|�|D]1\}}}}zt�|�}Wnty2���||���Ynw���||��������d�q|S)NrJ�rqryr"�	Exceptionr�r���msgr�ro�okr%r��homeclsrl�rCrB�hr�mdictrhrrxr9rr�spillzs��
zHTMLDoc.docclass.<locals>.spillc�Jt||�\}}|r#����|�|D]\}}}}���||���q|Sr�rqryr�r��r�rhrxr9rr�spilldescriptors��z*HTMLDoc.docclass.<locals>.spilldescriptorsc
s�t||�\}}|rM����|�|D]9\}}}}��t�|�|��}t|�}	|	s0�d|�n��t|��j����}	d|	}	�d||	f��d�q|S)Nz<dl><dt>%s</dl>
z<dd><tt>%s</tt>z<dl><dt>%s%s</dl>
rJ)rqryr�r"rIrIr+)
r�r�ror�r%r�r�rlr;r<r�rr�	spilldata�s �
z#HTMLDoc.docclass.<locals>.spilldatac�,g|]\}}}}t|�d�r||||f�qS�)r8�r��r�r%r�r$rlrrrr���

�z$HTMLDoc.docclass.<locals>.<listcomp>r��-rc�|d�uS�NrLrrY��	thisclassrrr���z"HTMLDoc.docclass.<locals>.<lambda>�defined here�inherited from %sz:<br>
z
Methods %scS�|ddkS�NrK�methodrrYrrrr��r�zClass methods %scSr��NrKzclass methodrrYrrrr��r�zStatic methods %scSr��NrKz
static methodrrYrrrr��r�zReadonly properties %scSr��NrKr�rrYrrrr��r�zData descriptors %scSr��NrKr�rrYrrrr��r�zData and other attributes %scSr��NrKrmrrYrrrr��r�rDz*<a name="%s">class <strong>%s</strong></a>z/<strong>%s</strong> = <a name="%s">class %s</a>�(%s)rJ�()r(z<tt>%s<br>&nbsp;</tt>z#000000z#ffc8d8rY)r*rerrr�getmrorNryr4rr�r"r�rB�popleftrq�builtinsrr�rO�	signature�
ValueErrorrAr
rIrIr+r&)r9rr%rhrBrCri�realnamerQrr|�mror;r�r�r�r�rkr�r�rl�anchor�	inherited�tagrrR�declr��argspecr<r)	rCrBr�r�rhrrxr9r�rr�\s�

�	
���
�

�
�
�
�
�
��
#
���zHTMLDoc.docclasscCs	|�d|�|��S�N�=)r1r�rrrr�formatvalue��zHTMLDoc.formatvaluec	Cs�	|j}|p|}|r
|jpdd|}	d}
d}t|�rF|jj}|r.||ur-d|�||�}
n|jdur>d|�|jj|�}
nd|�||�}
t�|�sPt�|�rSd}
nd}
||kr`d|	|f}n"|ryt�||g�|uryd	|jd||f}d
}n|}d|	||f}d}t�	|�r�zt�
|�}Wn
ttfy�d}Ynw|r�t
|�}|dkr�d
|}|d
d�}|s�d}|
||�|�|
o�|�d|
�}|r�d|S|�t|�|j|||�}|o�d|}d||fS)NrDr�r� from � method of %s instance� unbound %s method�async z$<a name="%s"><strong>%s</strong></a>z<a href="#%s">%s</a>rKz)<a name="%s"><strong>%s</strong></a> = %s�<lambda>z$<strong>%s</strong> <em>lambda</em> r�(...)z'<font face="helvetica, arial">%s</font>z<dl><dt>%s</dt></dl>
z<dd><tt>%s</tt></dd>z<dl><dt>%s</dt>%s</dl>
)r*rbr+r,r4r�iscoroutinefunction�isasyncgenfunction�getattr_staticrUr�r�rBrAr
r1rIrIr+)r9rr%rhrBrCrjrir�r��note�skipdocs�imclass�asyncqualifierrZreallinkr�r�r�r<rrrr�sr�
�
���
���zHTMLDoc.docroutinecCsP	g}|j}|r|d|�|�t|�|j�}|r|d|�|d�d�|�S)Nz!<dl><dt><strong>%s</strong></dt>
z<dd><tt>%s</tt></dd>
r~rD)rrIrIr+rO�r9rr%rhrir�rxr<rrrr�Cs
zHTMLDoc.docdatacGs 	|rd|pd}||�|�S)Nz<strong>%s</strong> = rD�r�)r9rr%rhriZlhsrrrr�SszHTMLDoc.docothercCs�	g}|dur	i}t�|g�D]\}}}tdd�|D��rq|�|d|||vf�d||<q|��|�||j�}|�|dd|�S)Ncss,�|]}dt|�kodknVqdS)i�i��N)�ord�r�Zchrrr�	<genexpr>]s�*z HTMLDoc.index.<locals>.<genexpr>rDrKrWr_)rerf�anyrr�r0r9r')r9rr7rnror%rprrrr�indexXs
z
HTMLDoc.index�rD)r$rDNr )r�rr��NNN)r*rr r��_repr_instancer�r
rr#r&r'r+r0r1r3r4r6r9r:rIrLr�r�r�r�r�r�r�r�rrrrr2s@


�

+
y#
�
A
rc@s2eZdZ	dd�Zdd�Zdd�ZeZdd�Zd	S)
�TextReprcCr�r�r�rrrrr�krzTextRepr.__init__cCsTtt|�d�r dd�t|�j���}t||�r t||�||�Sttt|��|j	�Sr
)
r�r@rOr*r!r"r]r`r�rrrrrrqs

zTextRepr.repr1cCsHt||j�}t|�}d|vr"dt|dd�vr"d|d||dS|S)Nr�rrDrr)r]rr�rXrrrrrxs
zTextRepr.repr_stringcCs.zttt|��|j�WSd|jjYSr)r]r`r�rr,r*rrrrr�szTextRepr.repr_instanceN)r*rr r�rrrrrrrrr�is	r�c@s|eZdZ	e�ZejZdd�Zddd�Zdd�Zdd
d�Z	ddd
�Z
ddd�Zdd�Zddd�Z
ddd�ZeZddd�ZdS)�TextDoccCs	d�dd�|D��S)NrDcss�|]	}|d|VqdS)�Nrr�rrrr��s�zTextDoc.bold.<locals>.<genexpr>)rOr	rrr�bold�r�zTextDoc.bold�    cs@	|sdS�fdd�|�d�D�}|r|d��|d<d�|�S)NrDcsg|]}�|�qSrr�r�r���prefixrrr��r^z"TextDoc.indent.<locals>.<listcomp>rJr)r!rGrO)r9rWr�rPrr�r�indent�s

zTextDoc.indentcCs&	|�|���}|�|�d|dS)NrJr()r�rGr�)r9rrZclean_contentsrrrr&�szTextDoc.sectionNrDc
	s�	d}|D]I}t|�td�ur:|\}}||t|��}|r5||fkr5�fdd�|D�}	|dd�|	�}|d}qt|�tg�urN||�|�||d�}q|S)	NrDrc3s�|]}t|��VqdSr�rS)r�rP�rRrrr����z%TextDoc.formattree.<locals>.<genexpr>r�rJrJr�)r@rSrOrL)
r9rMrRrNr�rHrOrPrQrRrr�rrL�s 
��zTextDoc.formattreec	Cs	|j}tt|��\}}|�d||od|�}t|dd�}|�|�}|dur1||�d|d�}|r;||�d|�}g}	t�|t�D]\}
}|dusTt�	|�pQ||urat
|
||�ra|	�|
|f�qCg}t�|tj�D]!\}
}|dust�
|�st�	|�|ur�t
|
||�r�|�|
|f�qkg}
t�|t�D]\}
}t
|
||�r�|
�|
|f�q�g}t�}t|d�r�t�|j�D]\}}}|�|�|r�|�|d�q�|�|�q�|��||�d	d
�|��}g}t�|tj�D]\}
}|j�|d�r�|
|vr�|�|
�q�|�r|��||�dd
�|��}|	�rCd
d�|	D�}|�t�|d�|�g}|	D]\}
}|�|�||
|���q(||�dd
�|��}|�reg}|D]\}
}|�|�||
|���qJ||�dd
�|��}|
�r�g}|
D]\}
}|�|j||
|dd���ql||�dd
�|��}t|d��r�t|j�}|dd�dk�r�|dd�dk�r�|dd���}||�d|�}t|d��r�||�dt|j ��}t|d��r�||�dt|j!��}t|d��r�||�d t|j"��}zt�#|�}Wnt$�y�d!}Ynw||�d"|�}|S)#N�NAME� - r`zMODULE REFERENCEa.

The following documentation is automatically generated from the Python
source files.  It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations.  When in doubt, consult the module reference at the
location listed above.
ZDESCRIPTIONry�
 (package)zPACKAGE CONTENTSrJrZ
SUBMODULEScSr\rrr]rrrr��r^z%TextDoc.docmodule.<locals>.<listcomp>rK�CLASSES�	FUNCTIONS�F)r\ZDATArsrTrUrrVZVERSIONrxZDATErrZAUTHORrwZCREDITSr�ZFILE)%r*rQrIr&r"r�rrdrrdr�rrUr.rV�setr�rerfry�addr�rOrTr�rLrgr�r�rArsrMrxrrrwr�rB)r9rr%rhZsynop�descrHr�r�rCrkrlrBrmrnZ
modpkgs_namesrorRrpZ
submodulesrqrrlr�rrrr��s�
	����


�
�
��
$�zTextDoc.docmodulec	sB	�j}|p|}�j}�jfdd�}||krd��|�}n	��|�d|}|r7t||�}	|dd�|	�}g}
|
j�zt���}Wn
t	t
fyPd}Ynw|ret|�}|re|dkre�||d�t��}
|
rq�|
d�t
t����}t|�d	kr��d
�|D]
}�d||��q��d�td
d�t���D�tjd�}t|�}d}|rшd�|d|�D]}�d|�q�||kr͈dt||�d��d�G�fdd�d�}|�������fdd�}����fdd�}�����fdd�}�fdd�t��D�}|�r�|�r|���n|dd	�t|�fdd ��\}}�tju�r1�tju�r1|}�q��u�r9d!}nd"t��j�}t|��|d#||d$d ��}|d%||d&d ��}|d'||d(d ��}|d)||d*d ��}|d+||d,d ��}|d-||d.d ��}|}|�sd�|
�}
|
�s�|dS|d��|
��d/�dS)0NcSs
t||�Srr�)rPr�rrr�makenameruz"TextDoc.docclass.<locals>.makename�class z	 = class r�rJr�rJrLzMethod resolution order:r�rDcss0�|]}|j�d�s|jdkrt|j�VqdS)r~r�N)r*r�rrA)r�r$rrrr�Cs�
�
��z#TextDoc.docclass.<locals>.<genexpr>r�r�zBuilt-in subclasses:z    ... and z other subclassescrr)z(TextDoc.docclass.<locals>.HorizontalRulecSrsr�rtrrrrr�Uruz1TextDoc.docclass.<locals>.HorizontalRule.__init__crv)NzF----------------------------------------------------------------------rKrtrrwrrryWrzz.TextDoc.docclass.<locals>.HorizontalRule.maybeNr{rrwrrr|Tr}r|c
s�t||�\}}|r>����|�|D]*\}}}}zt�|�}Wnty2���||���Yqw���||����q|Srrr��r�rhrrxr9rrr�]s��zTextDoc.docclass.<locals>.spillcr�rr�r�r�rrr�nr�z*TextDoc.docclass.<locals>.spilldescriptorsc
	s�t||�\}}|rB����|�|D].\}}}}t|�}zt�|�}	Wnty2|j|}	Ynw��j|	|�d|d�d�q|S)Nr�)r\r<rJ)rqryrIr"r7�__dict__r�)
r�r�ror�r%r�r�rlr<r8r�rrr�ws��z#TextDoc.docclass.<locals>.spilldatacr�r�r�r�rrrr��r�z$TextDoc.docclass.<locals>.<listcomp>rcr�r�rrYr�rrr��r�z"TextDoc.docclass.<locals>.<lambda>r�r�zMethods %s:
cSr�r�rrYrrrr��r�zClass methods %s:
cSr�r�rrYrrrr��r�zStatic methods %s:
cSr�r�rrYrrrr��r�zReadonly properties %s:
cSr�r�rrYrrrr��r�zData descriptors %s:
cSr�r�rrYrrrr��r�zData and other attributes %s:
cSr�r�rrYrrrr��r�z |  )r*rerr��maprOrrr�r�rBrArIrr�rN�sortedr@�__subclasses__r�r�r�rqr�rrSr�r�rG)r9rr%rhrir�rQr�rrRrr�r�r<r�r;Z
subclassesZno_of_subclassesZMAX_SUBCLASSES_TO_DISPLAYZsubclassnamer|r�r�r�r�r�r�r)r�rhrrxr9r�rr�s�
��
��	
�

�

�
�
�
�
�
��
#zTextDoc.docclasscCs	d|�|�Sr�r�rrrrr���zTextDoc.formatvaluec	Cs�	|j}|p|}d}d}t|�r8|jj}|r"||ur!dt||�}n|jdur1dt|jj|�}ndt||�}t�|�sBt�|�rEd}	nd}	||krQ|�|�}
n|r^t�	||g�|ur^d}|�|�d|}
d}t�
|�r�zt�|�}Wn
tt
fy�d}Ynw|r�t|�}|d	kr�|�|�d
}
|dd�}|s�d}|	|
||}
|r�|
d
St|�p�d}|
d
|o�|�|���d
S)NrDrr�r�r�r�rK� = r�z lambda rr�rJ)r*rbr+r,rSrr�r�r�r�rUr�r�rBrArIr�rG)r9rr%rhrir�r�r�r�r�rr�r�r�r<rrrr��sZ�
�
�
�zTextDoc.docroutinecCsV	g}|j}|r||�|��|d�t|�pd}|r&||�|��|d�d�|�S)NrJrD)rr�rIr�rOr�rrrr��s
zTextDoc.docdatac
Cs�	|�|�}|r$|r|dpd|}|t|�}	|	dkr$|d|	�d}|r-|�|�dp.d|}|s7t|�}|rF|d|�t|��d7}|S)Nr�rDrrZrJ)r�rNr�rIr�rA)
r9rr%rhrNr\r<r�r�Zchoprrrr��s
zTextDoc.docother)r�)NrDr�r�)NNNNN)r*rr r�r�r�r�r�r&rLr�r�r�r�r�r�r�rrrrr��s 



e

7r�c@seZdZ	dd�ZdS)�
_PlainTextDoccCs|Srrr	rrrr�
�z_PlainTextDoc.boldN)r*rr r�rrrrr�sr�cCs	t�at|�dSr)�getpager�pagerr_rrrr�sr�c	sF	ttjd�s	tSttjd�stStj��rtj��stStj�d�p(tj�d���rJtj	dkr6�fdd�Stj�d�dvrD�fd	d�S�fd
d�Stj�d�dvrTtStj	dkr]dd�Sttd�rmt�
d
�dkrmdd�Sddl}|��\}}t�
|�z ttd�r�t�
d|�dkr�dd�Wt�|�StWt�|�St�|�w)N�isattyZMANPAGERZPAGER�win32c�tt|���Sr��
tempfilepager�plainr_�Z	use_pagerrrr�#r[zgetpager.<locals>.<lambda>ZTERM)ZdumbZemacscr�r)�	pipepagerr�r_r�rrr�%r[cs
t|��Sr�r�r_r�rrr�'�
cSstt|�d�S)Nzmore <r�r_rrrr�+r[�systemz(less) 2>/dev/nullrcS�
t|d�S)NZlessr�r_rrrr�-r�z	more "%s"cSr�)NZmorer�r_rrrr�4r�)r�r�stdin�
plainpager�stdoutr�r
r�r�platformr��tempfileZmkstemp�close�unlink�ttypager)r��fdr�rr�rr�s:


�r�cCs	t�dd|�S)Nz.rD)rErFr_rrrr�:r�r�c	Cs�	ddl}|j|d|jdd�}z&|j�}z|�|�Wn	ty$YnwWd�n1s/wYWn	ty>Ynw	z|��WdStyPYnwq@)NrT�backslashreplace)�shellr��errors)�
subprocess�Popen�PIPEr��write�KeyboardInterruptr��wait)rW�cmdr�proc�piperrrr�>s4��������r�c	Cs�	ddl}|���B}tj�|d�}t|ddtjdkrt�d�ndd��
}|�	|�Wd�n1s3wYt�
|d|d�Wd�dS1sNwYdS)	Nrz	pydoc.out�wrr�)r�encodingz "r;)r�ZTemporaryDirectoryr
r	rOr�rr��device_encodingr
r�)rWr
r�Ztempdirr�r�rrrr�Vs


���"�r�cCs$ttjdd�pd}|�|d��|�S)Nr�utf-8r)r"rr��encode�decode)rWrrrr�_escape_stdoutbsrc
Cs�	tt|���d�}zddl}tj��}|�|�}|�|�dd�}Wnt	t
tjfy6d}dd�}Ynwz�zt
tj�dd��}WntyNd}Ynw|dkrUd}|d}}tj�d�|d|��d�||d�r�tj�d	�tj��|�}	|	d
vr�tj�d�nB|	dvr�tj�d||d�|d}qj|	d
vr�|||}|dkr�d}tj�dd�||||��d�||}||d�spW|r�|�||j|�dSdS|r�|�||j|�ww)NrJrcSstj�d�Src)rr�r�rrrrr�or�zttypager.<locals>.<lambda>cSstj��dd�dd�S)NrrK)rr�r�rrrrr�rsZLINESrK�z
-- more --)�q�Qz
          
)�
rJ)�b�B�)r�rr!�ttyrr��filenoZ	tcgetattrZ	setcbreakr�r7�io�UnsupportedOperationrAr
r�rr�r�r
rO�flushZ	tcsetattrZ	TCSAFLUSH)
rWrPrr�oldZgetchar�hrZincrPrrrrgsZ


��
&����rcCs	tj�tt|���dSr)rr�r
r�rr_rrrr��sr�cCs�	t�|�r |jtjvrd|jSt|d�rd|jSd|jSt�|�r*d|jSt�|�r;d|jj	|jj|jfSt�
|�rLd|jj	|jj|jfSt|�rUd|jSt�|�r_d	|jSt�
|�rid
|jSt|�jS)Nzbuilt-in module ryzpackage zmodule zbuilt-in function zgetset descriptor %s.%s.%szmember descriptor %s.%s.%sr�z	function zmethod )rrTr*rr�r�r.Zisgetsetdescriptorr2rr3rr-r)r@)�thingrrr�describe�s4







�
�





r&c	Cs�	dd�|�d�D�}d\}}|t|�kr4td�|d|d��|�}|r-||d}}nn|t|�ks|r9|}nt}||d�D]}zt||�}WqAtyUYdSw|S)NcSsg|]}|r|�qSrr)r�r�rrrr��r^zlocate.<locals>.<listcomp>rr�rK)r!rNr�rOr�r"r7)r	r�rjr��nZ
nextmodulerr�rrr�locate�s$��r(cCsV	t|t�rt||�}|durtd|��||fSt|dd�}|t|t�r(|fSdfS)Nz~No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.r*)rrAr(r�r")r%r�rr%rrr�resolve�s

�r)� Python Library Documentation: %scCs�	|durt}t||�\}}t|�}t�|�}|r+d|vr+|d|d|�d��7}n
|r8||ur8|d|j7}t�|�s`t|�s`t�	|�s`t�
|�s`t|�s`t|d�rX|j
}nt|�}|d7}||d|�||�S)Nrz in z in module �
__origin__z objectr()rWr)r&rrd�rfindr*rTrrUr1rCr�r+r@r�)r%rr�Zrendererrr%r�r�rrr�
render_doc�s0

����
r-c
Csn	z|durtt|||��WdS|�t|||t��WdSttfy6}zt|�WYd}~dSd}~wwr)r�r-r
�	plaintextr�r��print)r%rr��outputrlrrrr<�s��r<c
Cs�	z;t||�\}}t�t|�t�||��}t|dddd��
}|�|�Wd�n1s.wYtd|d�WdStt	fyU}zt|�WYd}~dSd}~ww)Nr�rr)rZwrote)
r)�htmlrr&r�r�r
r/r�r�)r%r�rr%rr�rlrrr�writedoc�s���r2rDcCs4	|duri}t�|g|�D]	\}}}t|�qdSr)re�
walk_packagesr2)r�pkgpathZdonerorRrprrr�	writedocs
s

r5c@s�eZdZidd�dd�dd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�id d!�d"d#�d$d%�dd&�d#d'�d(d)�d*d+�d,d-�d.d/�d0d�d1d�d2d3�d4d5�d6d7�dd8�d9d:�dd;��d<d=i�Zd>d?�d@D�ZdAdBdCdDge�RdEdFdGdHdIdJdK�ZdLdMdNdOdPdQdRdSdTdUdVdWdWdXdXdY�Ze��D]\ZZ	e	D]Z
e�e
e�Zeevr�edZeZeee
<q�q�id[d\�dSd]�d^d_�d`da�dbdc�ddde�dfdg�dhdi�djdk�dldm�dndo�dpdq�drds�dtdu�dvdw�dxd[�dyd[�idzd{�dPd|�d}d~�dd��d�d��d�d#�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��dTd��d�d��d�dl�d�d��d�d��d�d��dod��d�d���id�d��d�d��d�d��d�d��dMd��d�d��d�d��d�dÓd�dœd+dƓddǓd�d	�d�dʓd�d̓d�d�d�d6�d�d#��dd�d�d�d�dԜ�Zd�d�dׄZ
ed�dل�Zed�dۄ�Zd�d݄Ze�Zefd�d߄Zd�d�Zd�d�Zd�d�Zd�d�Zd�d�d�Zd�d�Zd�d�Zd�d�Zd�d�d�Zd�d�d��Zd�d��Zd�d�d��Z d�S)��Helper�FalserD�None�True�andZBOOLEAN�as�with�assert)r=rD�async)r>rD�await)r?rD�break)r@�	while for�class)rBzCLASSES SPECIALMETHODS�continue)rCrA�def)ZfunctionrD�del)rE�BASICMETHODS�elif�if�else)rIrA�except�try�finally�for)rMzbreak continue while�from�import�global)rPznonlocal NAMESPACES)rH�
TRUTHVALUE)rO�MODULES�in)rS�SEQUENCEMETHODS�is�
COMPARISON�lambda)rWr��nonlocal)rXzglobal NAMESPACES�not�or�pass)r[rD�raise)r\�
EXCEPTIONS�return)r^r�)rKr]�while)r_zbreak continue if TRUTHVALUE)r<z CONTEXTMANAGERS EXCEPTIONS yield�yield)r`rDcCsg|]}dD]}||�qqS)��'r;r)r��prrrrr�Er�zHelper.<listcomp>)r�fr�urbz'''r;r�)�+r��*�**r�z//�%�<<�>>r�|�^�~rr�<=�>=�==�!=�<>)rrrorprqrrrs)r�rn)z+=z-=z*=z/=z%=z&=z|=z^=z<<=z>>=z**=z//=)rjrkrrlrmrn)�j�J)�STRINGS�	OPERATORSrV�UNARY�AUGMENTEDASSIGNMENT�BITWISE�COMPLEXzOPERATORS FORMATTINGZPOWERzTUPLES LISTS FUNCTIONSz ATTRIBUTES FLOAT MODULES OBJECTS�ELLIPSISzSLICINGS DICTIONARYLITERALSz	def classrvZPRIVATENAMESzPRIVATENAMES SPECIALMETHODSZ
BACKQUOTESzTUPLES FUNCTIONS CALLSzLISTS SUBSCRIPTS SLICINGS)rirh�,rrZ�:�@r�r~r}�`r<rK�[�]r��TYPES)rzRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspect)�stringsz4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPESZ
STRINGMETHODS)zstring-methodszSTRINGS FORMATTINGZ
FORMATTING)Z
formatstringsrw�UNICODE)r�z:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPESZNUMBERS)ZnumberszINTEGER FLOAT COMPLEX TYPESZINTEGER)Zintegersz	int rangeZFLOAT)Zfloatingz
float mathr{)Z	imaginaryz
complex cmathZ	SEQUENCES)Ztypesseqz$STRINGMETHODS FORMATTING range LISTSZMAPPINGSZDICTIONARIESr�)Ztypesfunctionsz	def TYPESZMETHODS)Ztypesmethodszclass def CLASSES TYPESZCODEOBJECTS)zbltin-code-objectszcompile FUNCTIONS TYPESZTYPEOBJECTS)zbltin-type-objectsztypes TYPESZFRAMEOBJECTSZ
TRACEBACKSZNONE)zbltin-null-objectrD)zbltin-ellipsis-object�SLICINGSZSPECIALATTRIBUTES)ZspecialattrsrDr�)rz!class SPECIALMETHODS PRIVATENAMESrR)ZtypesmodulesrOZPACKAGES�EXPRESSIONS)zoperator-summaryz�lambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIESrwZ
PRECEDENCEZOBJECTS)Zobjectsr�ZSPECIALMETHODS)ZspecialnameszbBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS NUMBERMETHODS CLASSESrF)Z
customizationzhash repr str SPECIALMETHODSZATTRIBUTEMETHODS)zattribute-accesszATTRIBUTES SPECIALMETHODSZCALLABLEMETHODS)zcallable-typeszCALLS SPECIALMETHODSrT)�sequence-typesz(SEQUENCES SEQUENCEMETHODS SPECIALMETHODSZMAPPINGMETHODS)r�zMAPPINGS SPECIALMETHODS�
NUMBERMETHODS)z
numeric-typesz*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODSZ	EXECUTION)Z	execmodelz%NAMESPACES DYNAMICFEATURES EXCEPTIONSZ
NAMESPACES)Znamingz3global nonlocal ASSIGNMENT DELETION DYNAMICFEATURESZDYNAMICFEATURES)zdynamic-featuresrDZSCOPINGZFRAMESr])r�ztry except finally raiseZCONVERSIONS)ZconversionsrDZIDENTIFIERS)Zidentifierszkeywords SPECIALIDENTIFIERSZSPECIALIDENTIFIERS)z
id-classesrD)zatom-identifiersrDZLITERALS)z
atom-literalsz=STRINGS NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALSZTUPLESZ
TUPLELITERALS)Z	exprlistszTUPLES LITERALSZLISTS)ztypesseq-mutable�LISTLITERALSr�)ZlistszLISTS LITERALS)Ztypesmapping�DICTIONARYLITERALSr�)r4zDICTIONARIES LITERALSZ
ATTRIBUTES)zattribute-referencesz(getattr hasattr setattr ATTRIBUTEMETHODSZ
SUBSCRIPTS)Z
subscriptionsrTr�)ZslicingsrTZCALLS)Zcallsr�)Zpowerr�rx)Zunaryr�ZBINARY)Zbinaryr�ZSHIFTING)Zshiftingr�rz)Zbitwiser�)ZcomparisonszEXPRESSIONS BASICMETHODS)ZbooleanszEXPRESSIONS TRUTHVALUEZ	ASSERTIONZ
ASSIGNMENT)Z
assignmentryry)Z	augassignr�ZDELETIONZ	RETURNINGZ	IMPORTING)Zcompoundzfor while break continue)�truthz if while and or not BASICMETHODS)ZdebuggerZpdb)zcontext-managersr<)ZCONDITIONALZLOOPINGrQZ	DEBUGGINGZCONTEXTMANAGERSNcCs||_||_dSr)�_input�_output)r9�inputr0rrrr��s
zHelper.__init__cC�|jptjSr)r�rr�rrrrr���zHelper.inputcCr�r)r�rr�rrrrr0�r�z
Helper.outputcCs2t��dddkr|�dSd|jj|jjfS)NrKrY�?rDz<%s.%s instance>)r�stackr,rr rrrr�__repr__�s�zHelper.__repr__cCs8||jur|�|�dS|��|��|j�d�dS)Na
You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.
)�_GoInteractiver�intro�interactr0r
�r9Zrequestrrr�__call__�s

zHelper.__call__c	Cs�|j�d�	z|�d�}|sWdSWnttfyYdSw|��}t|�dkrJ|d|dkr8dvrJnn|d|dd�vrJ|dd�}|��d	vrRdS|d
kr[|��n|�	|�q)NrJTzhelp> rLrrrarK)r�quitr)
r0r
�getliner�EOFErrorrMrNr�r�rr�rrrr��s"
�,

�zHelper.interactcCs6	|jtjurt|�S|j�|�|j��|j��Sr)r�rr�r0r
r"r�)r9�promptrrrr��s

zHelper.getlinecCs8t|�td�ur�|��}|dkr|��n|dkr|��nv|dkr'|��nm|dkr0|��nd|dd�dkrB|�|��d�nR||jvrM|�|�nG|d	vrYt	t
|�d
�n;||jvrd|�|�n0||j
vro|�|�n%|rzt	|d
|jd�nt	td
|jd�nt|t�r�|�nt	|d
|jd�|j�d�dS)
NrD�keywords�symbols�topicsr�zmodules rK)r9r7r8zHelp on %s:)r0rJ)r@rM�listkeywords�listsymbols�
listtopics�listmodulesr!r��
showsymbolr<�evalr��	showtopicr�r�rArr6r0r
r�rrrr�s$zHelper.helpcCs$|j�d�dtjdd���dS)Na�
Welcome to Python {0}'s help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the internet at https://docs.python.org/{0}/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".
z%d.%drL)r0r
r�rr�rrrrr�s�zHelper.intror��Pc	
Cs�tt|��}||}t|�|d|}t|�D];}t|�D].}|||}|t|�krL|j�||�||dkrL|j�dd|dt||��q|j�d�qdS)NrKr�rJ)r-r�rNr,r0r
)	r9�items�columnsr%Zcolwr.�rowr/r�rrrr-%s$��zHelper.listcC� |j�d�|�|j���dS)NzN
Here is a list of the Python keywords.  Enter any keyword to get more help.

)r0r
r-r�rhrrrrr�2�zHelper.listkeywordscCr�)Nzx
Here is a list of the punctuation symbols which Python assigns special meaning
to. Enter any symbol to get more help.

)r0r
r-r�rhrrrrr�9szHelper.listsymbolscCr�)NzN
Here is a list of available topics.  Enter any topic name to get more help.

)r0r
r-r�rhrrrrr�Ar�zHelper.listtopicscCs*zddl}Wnty|j�d�YdSw|j�||j�|��}|s0|j�dt|��dSt|�td�ur>|�	||�S|\}}z|jj|}Wnt
y^|j�dt|��YdSw|��d}|ro|pjdd|}|r�ddl}dd�
|���d}	|�|	d	�}
|d
d�
|
�7}t|�dS)Nr�t
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.
zno documentation found for %s
rDrJr��Related help topics: rJ�Hz
%s
)�pydoc_data.topicsr�r0r
r�rr�r�r@r��KeyErrorrM�textwraprOr!Zwrapr�)r9�topic�
more_xrefs�
pydoc_data�target�label�xrefsr<r�rWZwrapped_textrrrr�Hs8��zHelper.showtopiccCs�	zddl}Wn
tyYdSw|j�||j�|��}|s#td��t|t�r.|�||�S|\}}|jj|}|rB|p=dd|}||fS)Nr)r�rDzcould not find topicrDr�)	r�r�r�rr�r�rrA�	_gettopic)r9r�r�r�r�r�r�r<rrrr�hs �
zHelper._gettopiccCs*|j|}|�d�\}}}|�||�dS)Nr�)r��	partitionr�)r9�symbolr�r�r~r�rrrr��s
zHelper.showsymbolcsx|r|j�d�|��t|�dS|j�d�i}|fdd���fdd�}t�j�|d�|�|���|j�d�dS)	Nzy
Here is a list of modules whose name or summary contains '{}'.
If there are any, enter a module name to get more help.

zI
Please wait a moment while I gather a list of all available modules...

cSsB|r|dd�dkr|dd�d}|�d�dkrd||<dSdS)N����	.__init__r�rrrK)�find)r	rRr�rrrr�callback�s
�z$Helper.listmodules.<locals>.callbackcs�d|d�dSrrr��r�rr�onerror�sz#Helper.listmodules.<locals>.onerror�r�z�
Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
)r0r
r��apropos�
ModuleScanner�runr-rh)r9rkrr�rr�rr��s�zHelper.listmodulesr�)r�r�r�)!r*rr r�Z_strprefixesZ_symbols_inverser�r�r�Zsymbols_r�rr�r�r/r�r0r�rr�r�r�r�rr�r-r�r�r�r�r�r�r�rrrrr6s
��������	�
���
������������������� �!�"�#�'��
������	�
���
���������������� �!�"�%�&�'�(�*�+�-�.�/�0�1�2�3�4�5�6�7�9�:�;�<�=�>�?�@�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�
W


	



 r6c@seZdZ	ddd�ZdS)r�Nc	Cs�|r|��}d|_i}tjD]8}|dkrFd||<|dur#|d|d�qt|�jp)d}|�d�d}|d|}|���|�dkrF|d||�qtj	|d�D]�\}	}}
|jrWn�|durb|d|d�qMzt�
|	|�}Wn	tysYqMw|j}t
|d	�r�z|�|�}
Wnty�|r�||�YqMwtt�|
��p�d}t
|d
�r�|�|�}n-d}n*ztj�|�}Wnty�|r�||�YqMw|jr�|j��dnd}t|dd�}|d|}|���|�dkr�||||�qM|r�|�dSdS)NF�__main__rKrDrJrr�r��
get_source�get_filenamer|)r�r�rr�r�r>r!r�rer3�	_get_specr�r�r�r�r�r�r �StringIOr�r�r�r�r�r�r")r9r�rkZ	completerr��seenrRr%r�rorpr�r��sourcer	r�rrrr��sj
��
�
��
�zModuleScanner.runr�)r*rr r�rrrrr��sr�cCs\	dd�}dd�}t���t�d�t�j|||d�Wd�dS1s'wYdS)NcSs6|dd�dkr|dd�d}t||od|�dS�Nr�r�r�z- )r/�r	rRr�rrrr��szapropos.<locals>.callbackcS�dSrrr�rrrr��r�zapropos.<locals>.onerror�ignorer�)�warnings�catch_warnings�filterwarningsr�r�)rkr�r�rrrr��s

"�r�cs�	ddl�ddl�ddl�ddl�Gdd�d�jj��G�fdd�d�jj��G�����fdd�d�j�}||||�}|��|j	sQ|j
sQt�d�|j	sQ|j
rF|S)	Nrc@seZdZdd�Zdd�ZdS)z!_start_server.<locals>.DocHandlercSsZ	|j�d�r
d}nd}|�d�|�dd|�|��|j�|�|j|��d��dS)Nz.css�text/css�	text/html��zContent-Typez%s; charset=UTF-8r)	r	r�Z
send_responseZsend_headerZend_headersZwfiler
�
urlhandlerr)r9�content_typerrr�do_GET0	s

��z(_start_server.<locals>.DocHandler.do_GETcWr�rr)r9r�rrr�log_message@	sz-_start_server.<locals>.DocHandler.log_messageN)r*rr r�r�rrrr�
DocHandler.	sr�cs(eZdZdd�Z�fdd�Zdd�ZdS)z _start_server.<locals>.DocServercSs6||_|j|f|_||_|j�||j|j�d|_dS�NF)�hostZaddressr�r;r��handlerr�)r9r��portr�rrrr�F	s

z)_start_server.<locals>.DocServer.__init__csB|js��|j��gggd�\}}}|r|��|jr|��dSrc)r��selectZsocketrZhandle_requestZserver_close)r9ZrdZwrZex�r�rr�serve_until_quitM	s�z1_start_server.<locals>.DocServer.serve_until_quitcSs$|j�|�|jr|�|�dSdSr)r;�server_activater�rrrrr�T	s�z0_start_server.<locals>.DocServer.server_activateN)r*rr r�r�r�rr�rr�	DocServerD	sr�cs:eZdZ�fdd�Z����fdd�Zdd�Zdd�Zd	S)
z#_start_server.<locals>.ServerThreadcs2||_||_t|�|_�j�|�d|_d|_dSr�)r�r�rAr��Threadr��serving�error)r9r�r�r�)�	threadingrrr�[	s

z,_start_server.<locals>.ServerThread.__init__c
s|	z&�jj�_��_�jj�_t|j��_�|j	|j
|j�}||_|�
�WdSty=}z
||_WYd}~dSd}~wwr)�server�
HTTPServerr;r�r�ZMessageZMessageClass�staticmethodr�r�r��ready�	docserverr�r�r�)r9Zdocsvr�e)r�r��email�httprrr�c	s

��z'_start_server.<locals>.ServerThread.runcSs,d|_|j|_|j|_d|j|jf|_dS)NTz
http://%s:%d/)r�r�Zserver_portr�r8)r9r�rrrr�p	sz)_start_server.<locals>.ServerThread.readycSs(	d|j_|��d|_d|_d|_dS)NTF)r�r�rOr�r8rrrr�stopv	s
z(_start_server.<locals>.ServerThread.stopN)r*rr r�r�r�r�r)r�r�r�r�r�rr�ServerThreadY	s

r�g{�G�z�?)
Zhttp.serverZ
email.messager�r�r�ZBaseHTTPRequestHandlerr�r�rGr�r��time�sleep)r��hostnamer�r��threadr)r�r�r�r�r�r�r�
_start_server�s7'
�r�r�cs.	G�fdd�dt�}|���fdd���fdd���fdd���fd	d
���fdd���fd
d���fdd���fdd����������fdd�}|�d�rV|dd�}|dkr�tj�tj�t��}tj�||�}t|��}d�|�	��Wd�S1s�wYn|dkr�||�St
d||f��)NcseZdZ�fdd�ZdS)z_url_handler.<locals>._HTMLDoccs 	d}d|}d||��|fS)Nzpydoc_data/_pydoc.cssz1<link rel="stylesheet" type="text/css" href="%s">a<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Pydoc: %s</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
%s</head><body bgcolor="#f0f0f8">%s<div style="clear:both;padding-top:.5em;">%s</div>
</body></html>r)r9rr�css_pathZcss_link��html_navbarrrr�	s���z#_url_handler.<locals>._HTMLDoc.pageN)r*rr rrr�rr�_HTMLDoc�	sr�cs>��dt��t��dt��f�}d|��tjdd��fS)Nz%s [%s, %s]raZ
            <div style='float:left'>
                Python %s<br>%s
            </div>
            <div style='float:right'>
                <div style='text-align:center'>
                  <a href="index.html">Module Index</a>
                  : <a href="topics.html">Topics</a>
                  : <a href="keywords.html">Keywords</a>
                </div>
                <div>
                    <form action="get" style='display:inline;'>
                      <input type=text name=key size=15>
                      <input type=submit value="Get">
                    </form>&nbsp;
                    <form action="search" style='display:inline;'>
                      <input type=text name=key size=15>
                      <input type=submit value="Search">
                    </form>
                </div>
            </div>
            T)Zterse)r
r�Zpython_versionZpython_buildZpython_compiler)rl�r1rrr��	s
��z!_url_handler.<locals>.html_navbarcs�	dd�}��ddd�}dd�tjD�}��||�}|d��d	dd
|�g}i}tjD]}|���||��q+|�d�dd
�|�fS)NcS�d||fSr5r�r%rrr�	bltinlink�	rz3_url_handler.<locals>.html_index.<locals>.bltinlinkz7<big><big><strong>Index of Modules</strong></big></big>rWrXcSsg|]}|dkr|�qS)r�r)r�r%rrrr��	s�z4_url_handler.<locals>.html_index.<locals>.<listcomp>z<p>zBuilt-in Modulesr_z|<p align=right><font color="#909090" face="helvetica,arial"><strong>pydoc</strong> by Ka-Ping Yee&lt;ping@lfw.org&gt;</font>zIndex of ModulesrD)	r#rr�r0r'r	rr�rO)rr#�namesrr�rr�rr�
html_index�	s$��
�z _url_handler.<locals>.html_indexc		s�	g��fdd�}t���t�d�dd�}t�j|||d�Wd�n1s*wYdd�}g}��d	d
d�}�D]
\}}|�||�|�q>|��d|d
d
d�|��}d|fS)Ncs:|dd�dkr|dd�d}��||od|f�dSr�rmr��Z
search_resultrrr��	sz3_url_handler.<locals>.html_search.<locals>.callbackr�cSr�rrr�rrrr��	r�z2_url_handler.<locals>.html_search.<locals>.onerrorr�cSr�r5rrrrrr�	rz4_url_handler.<locals>.html_search.<locals>.bltinlinkz5<big><big><strong>Search Results</strong></big></big>rWrXzkey = %sr_�<br>zSearch Results)	r�r�r�r�r�r#rr'rO)	rkr�r�rr�r#r%r�rr�rr�html_search�	s(

���z!_url_handler.<locals>.html_searchcsN	dd�}��ddd�}ttj���}��||�}|��ddd|�}d|fS)NcSr��Nz<a href="topic?key=%s">%s</a>rrrrrr�	rz4_url_handler.<locals>.html_topics.<locals>.bltinlink�,<big><big><strong>INDEX</strong></big></big>rWrXZTopicsr_)r#r�r6r�rhr0r')rr#rrr�rr�html_topics�	s��z!_url_handler.<locals>.html_topicscsN	��ddd�}ttj���}dd�}��||�}|��ddd|�}d|fS)NrrWrXcSr�rrrrrrr
rz6_url_handler.<locals>.html_keywords.<locals>.bltinlinkZKeywordsr_)r#r�r6r�rhr0r')r#rrrr�rr�
html_keywords
s��z#_url_handler.<locals>.html_keywordscs�	t��}t||�}|�|�\}}||jvrd}nd}��d|dd�}d��|�}��|dd|�}|rMt|�	��}dd	�}��
||�}��d
dd|�}d||fd�|||f�fS)
NZKEYWORDZTOPICrSrWrXz
<pre>%s</pre>r_cSr�rrrrrrr&
rz7_url_handler.<locals>.html_topicpage.<locals>.bltinlinkr�z%s %srD)
r r�r6r�r�r#rIr'r�r!r0r&rO)r�ZbufZhtmlhelprr�rr#rr�rr�html_topicpage
s.

��
�z$_url_handler.<locals>.html_topicpagecs@t|dd�}|dur|dkrtd��t|�}��||�}||fS)NrK)r�r8zcould not find object)r(r�r&r�)r8r8r�contentr�rr�html_getobj/
sz!_url_handler.<locals>.html_getobjcsP��ddd�}d��fdd�tt|�|�D��}|��|dd|�}d||fS)	Nz,<big><big><strong>Error</strong></big></big>rWrXrc3s�|]}��|�VqdSr)r
r�r�rrr�;
r�z3_url_handler.<locals>.html_error.<locals>.<genexpr>z#bb0000z
Error - %s)r#rOrr@r')r8r�r#rr�rr�
html_error7
s���z _url_handler.<locals>.html_errorc
sb	|}|�d�r|dd�}z�|dvr��\}}nw|dkr#��\}}nm|dkr-��\}}ncd|vr�|�d�\}}}|dkrD�|�\}}nL|dkr`z�|�\}}Wn?ty_�|�\}}Yn1w|d	kr�|dvrn��\}}n"z�|�\}}Wnty��|�\}}Ynwtd
���|�\}}Wnty�}z
�||�\}}WYd}~nd}~ww��||�S)Nr����)rDr�r�r�r�z
search?keyz	topic?keyzget?keyz
bad pydoc url)r�r�r�r�r)r8Zcomplete_urlrr�opr~r�)r1rr
rr
rrr	rr�
get_html_pageA
sJ
�����z#_url_handler.<locals>.get_html_pager�rKr�rDr�z"unknown content type %r for url %s)rr�r
r	�dirname�realpathr|rOr��	readlinesrB)r8r�r�rZ	path_herer��fpr)	r1rr
rr
r�rrr	r�_url_handler�	s.

(
"�rT�	localhost)�open_browserr�c	Cs�	ddl}tt||�}|jrt|j�dS|jr}d}|r"|�|j�zMz.td|j�t|�|jrPtd�}|�	�}|dkr>n|dkrI|�|j�nt|�|js1Wnt
tfy_t�YnwW|jrn|��td�dSdS|jr||��td�wwdS)Nrz"Server commands: [b]rowser, [q]uitzServer ready atzserver> rrzServer stopped)
�
webbrowserr�rr�r/r�r�r8r�r�rr�r�)r�rr�rZserverthreadZserver_help_msgr
rrr�browsev
sF
��	
��
�
��rcCst|t�o|�tj�dkSr�)rrAr�r
�sep)rprrr�ispath�
srcCsx	d|vstj|vst��|vrdStj�t�}tj�|�}|��}||vr2tj�||�s2|�|�|�	dt���|S)NrDr)
r
�curdir�getcwdr	rr|�copy�samefile�remove�insert)Z
given_pathZargv0Z
stdlib_dirZ
script_dir�revised_pathrrr�_get_revised_path�
s
r$cCs2	ttjtjd�}|dur|tjdd�<dSdSr�)r$rr	�argv)r#rrr�_adjust_cli_sys_path�
s
�r&cCs�	ddl}Gdd�dt�}t�z�|�tjdd�d�\}}d}d}d}d}d}|D].\}	}
|	dkr6d	}d	}|	d
krBt|
�WdS|	dkrJd	}|
}|	dkrPd	}|	d
krXd	}|
}q*|ret|||d�WdS|si|�|D]W}t|�r�tj	�
|�s�td|�WdSz+t|�r�tj	�|�r�t
|�}|r�t|�r�tj	�|�r�t|�n
t|�nt�|�Wqkty�}z
t|�WYd}~qkd}~wwWdS|j|fy�tj	�tj	�tjd��d}
tdj|
tjd��YdSw)Nrc@seZdZdS)zcli.<locals>.BadUsageN)r*rr rrrr�BadUsage�
r�r'rKzbk:n:p:wFrz-bTz-kz-pz-wz-n)r�rzfile %r does not exista�pydoc - the Python documentation tool

{cmd} <name> ...
    Show text documentation on something.  <name> may be the name of a
    Python keyword, topic, function, module, or package, or a dotted
    reference to a class or function within a module or module in a
    package.  If <name> contains a '{sep}', it is used as the path to a
    Python source file to document. If name is 'keywords', 'topics',
    or 'modules', a listing of these things is displayed.

{cmd} -k <keyword>
    Search for a keyword in the synopsis lines of all available modules.

{cmd} -n <hostname>
    Start an HTTP server with the given hostname (default: localhost).

{cmd} -p <port>
    Start an HTTP server on the given port on the local machine.  Port
    number 0 can be used to get an arbitrary unused port.

{cmd} -b
    Start an HTTP server on an arbitrary unused port and open a web browser
    to interactively browse documentation.  This option can be used in
    combination with -n and/or -p.

{cmd} -w <name> ...
    Write out the HTML documentation for a module to a file in the current
    directory.  If <name> contains a '{sep}', it is treated as a filename; if
    it names a directory, documentation is written for all the contents.
)r
r)�getoptr�r&rr%r�rrr
r	�existsr/r�r�r
r5r2rr�r�r�r�r�r)r(r'Zoptsr�ZwritingZstart_serverrr�r��opt�val�argrlr
rrr�cli�
sn�


������r-r�r�)r)r*rN)rDN)r�)_r`rrrxrwr�Zimportlib._bootstrapr�Zimportlib._bootstrap_external�importlib.machinery�importlib.utilrr r
rer�rErr�r�r�rZurllib.parserar��collectionsr�reprlibr�	tracebackrrrr&r=r6rCrIrQrSrVrXr]r=�
IGNORECASEr^r`rbrgrqr�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�rrr�r&r(rWr.r1r)r-r<r2r5r6rr�r�r�rrrr$r&r-r*rrrr�<module>s�&

3	


'
0:*; ",


�
�

=
n%

U
�