Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.15.208.109
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : inspect.cpython-32.pyc
l
��bc@s�dZdZdZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZyddlmZWn9ek
r�dm\ZZdn\ZZdo\ZZZYn5Xe�Zx(ej�D]\ZZeede<qWdpZ d�Z!d�Z"d�Z#d�Z$d�Z%e&ed�rpd�Z'n	d�Z'e&ed�r�d�Z(n	d�Z(d�Z)d�Z*d�Z+d�Z,d �Z-d!�Z.d"�Z/d#�Z0d$�Z1dd%�Z3ed&d'�Z4d(�Z5d)�Z6d*�Z7d+�Z8d,�Z9d-�Z:ed.d/�Z;d0�Z<d1�Z=d2�Z>dd3�Z?iZ@iZAdd4�ZBd5�ZCd6�ZDGd7�d8eE�ZFGd9�d:�ZGd;�ZHd<�ZId=�ZJd>�ZKdqd?�ZMed@dA�ZNdB�ZOdC�ZPedDdE�ZQdF�ZRedGdH�ZSdI�ZTedJdK�ZUdL�ZVddM�ZWdN�ZXddddriieYdO�dP�dQ�dR�eWdS�ZZeYdT�dU�dV�dW�Z[dX�Z\edYdZ�Z]dd[�Z^d\�Z_dd]�Z`dd^�Zad_�Zbdd`�Zcdda�Zdee�Zfdb�Zgdc�Zhdd�Zide�Zjdf�Zkefdg�ZldhZmdiZndjZodkZpdl�ZqdS(su�Get useful information from live Python objects.

This module encapsulates the interface provided by the internal special
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.

Here are some of the useful functions provided by this module:

    ismodule(), isclass(), ismethod(), isfunction(), isgeneratorfunction(),
        isgenerator(), istraceback(), isframe(), iscode(), isbuiltin(),
        isroutine() - check object types
    getmembers() - get members of an object that satisfy a given condition

    getfile(), getsourcefile(), getsource() - find an object's source code
    getdoc(), getcomments() - get documentation on an object
    getmodule() - determine the module that an object came from
    getclasstree() - arrange classes so as to represent their hierarchy

    getargspec(), getargvalues(), getcallargs() - get info about function arguments
    getfullargspec() - same, with support for Python-3000 features
    formatargspec(), formatargvalues() - format an argument spec
    getouterframes(), getinnerframes() - get info about frames
    currentframe() - get the current stack frame
    stack(), trace() - get info about frames on the stack or in a traceback
uKa-Ping Yee <ping@lfw.org>u
1 Jan 2001iN(u
attrgetter(u
namedtuple(uCOMPILER_FLAG_NAMESiiiiii i@uCO_icCst|tj�S(u�Return true if the object is a module.

    Module objects provide these attributes:
        __cached__      pathname to byte compiled file
        __doc__         documentation string
        __file__        filename (missing for built-in modules)(u
isinstanceutypesu
ModuleType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuismodule>scCs
t|t�S(u�Return true if the object is a class.

    Class objects provide these attributes:
        __doc__         documentation string
        __module__      name of module in which this class was defined(u
isinstanceutype(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisclassGscCst|tj�S(u_Return true if the object is an instance method.

    Instance method objects provide these attributes:
        __doc__         documentation string
        __name__        name with which this method was defined
        __func__        function object containing implementation of method
        __self__        instance to which this method is bound(u
isinstanceutypesu
MethodType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuismethodOscCsQt|�s$t|�s$t|�r(dSt|�}t|d�oPt|d�S(u�Return true if the object is a method descriptor.

    But not if ismethod() or isclass() or isfunction() are true.

    This is new in Python 2.2, and, for example, is true of int.__add__.
    An object passing this test has a __get__ attribute but not a __set__
    attribute, but beyond that the set of attributes varies.  __name__ is
    usually sensible, and __doc__ often is.

    Methods implemented via descriptors that also pass one of the other
    tests return false from the ismethoddescriptor() test, simply because
    the other tests promise more -- you can, e.g., count on having the
    __func__ attribute (etc) when an object passes ismethod().u__get__u__set__F(uisclassuismethodu
isfunctionuFalseutypeuhasattr(uobjectutp((u./usr/local/python-3.2/lib/python3.2/inspect.pyuismethoddescriptorYs$cCsPt|�s$t|�s$t|�r(dSt|�}t|d�oOt|d�S(u�Return true if the object is a data descriptor.

    Data descriptors have both a __get__ and a __set__ attribute.  Examples are
    properties (defined in Python) and getsets and members (defined in C).
    Typically, data descriptors will also have __name__ and __doc__ attributes
    (properties, getsets, and members have both of these attributes), but this
    is not guaranteed.u__set__u__get__F(uisclassuismethodu
isfunctionuFalseutypeuhasattr(uobjectutp((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisdatadescriptorms$uMemberDescriptorTypecCst|tj�S(u�Return true if the object is a member descriptor.

        Member descriptors are specialized descriptors defined in extension
        modules.(u
isinstanceutypesuMemberDescriptorType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuismemberdescriptor}scCsdS(u�Return true if the object is a member descriptor.

        Member descriptors are specialized descriptors defined in extension
        modules.F(uFalse(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuismemberdescriptor�suGetSetDescriptorTypecCst|tj�S(u�Return true if the object is a getset descriptor.

        getset descriptors are specialized descriptors defined in extension
        modules.(u
isinstanceutypesuGetSetDescriptorType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisgetsetdescriptor�scCsdS(u�Return true if the object is a getset descriptor.

        getset descriptors are specialized descriptors defined in extension
        modules.F(uFalse(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisgetsetdescriptor�scCst|tj�S(u(Return true if the object is a user-defined function.

    Function objects provide these attributes:
        __doc__         documentation string
        __name__        name with which this function was defined
        __code__        code object containing compiled function bytecode
        __defaults__    tuple of any default values for arguments
        __globals__     global namespace in which this function was defined
        __annotations__ dict of parameter annotations
        __kwdefaults__  dict of keyword only parameters with defaults(u
isinstanceutypesuFunctionType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
isfunction�scCs,tt|�st|�o(|jjt@�S(u�Return true if the object is a user-defined generator function.

    Generator function objects provides same attributes as functions.

    See help(isfunction) for attributes listing.(uboolu
isfunctionuismethodu__code__uco_flagsuCO_GENERATOR(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisgeneratorfunction�scCst|tj�S(u Return true if the object is a generator.

    Generator objects provide these attributes:
        __iter__        defined to support interation over container
        close           raises a new GeneratorExit exception inside the
                        generator to terminate the iteration
        gi_code         code object
        gi_frame        frame object or possibly None once the generator has
                        been exhausted
        gi_running      set to 1 when generator is executing, 0 otherwise
        next            return the next item from the container
        send            resumes the generator and "sends" a value that becomes
                        the result of the current yield-expression
        throw           used to raise an exception inside the generator(u
isinstanceutypesu
GeneratorType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisgenerator�scCst|tj�S(ubReturn true if the object is a traceback.

    Traceback objects provide these attributes:
        tb_frame        frame object at this level
        tb_lasti        index of last attempted instruction in bytecode
        tb_lineno       current line number in Python source code
        tb_next         next inner traceback object (called by this level)(u
isinstanceutypesu
TracebackType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuistraceback�scCst|tj�S(u`Return true if the object is a frame object.

    Frame objects provide these attributes:
        f_back          next outer frame object (this frame's caller)
        f_builtins      built-in namespace seen by this frame
        f_code          code object being executed in this frame
        f_globals       global namespace seen by this frame
        f_lasti         index of last attempted instruction in bytecode
        f_lineno        current line number in Python source code
        f_locals        local namespace seen by this frame
        f_trace         tracing function for this frame, or None(u
isinstanceutypesu	FrameType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuisframe�scCst|tj�S(uuReturn true if the object is a code object.

    Code objects provide these attributes:
        co_argcount     number of arguments (not including * or ** args)
        co_code         string of raw compiled bytecode
        co_consts       tuple of constants used in the bytecode
        co_filename     name of file in which this code object was created
        co_firstlineno  number of first line in Python source code
        co_flags        bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg
        co_lnotab       encoded mapping of line numbers to bytecode indices
        co_name         name with which this code object was defined
        co_names        tuple of names of local variables
        co_nlocals      number of local variables
        co_stacksize    virtual machine stack space required
        co_varnames     tuple of names of arguments and local variables(u
isinstanceutypesuCodeType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyuiscode�scCst|tj�S(u,Return true if the object is a built-in function or method.

    Built-in functions and methods provide these attributes:
        __doc__         documentation string
        __name__        original name of this function or method
        __self__        instance to which a method is bound, or None(u
isinstanceutypesuBuiltinFunctionType(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyu	isbuiltin�scCs.t|�p-t|�p-t|�p-t|�S(u<Return true if the object is any kind of function or method.(u	isbuiltinu
isfunctionuismethoduismethoddescriptor(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyu	isroutine�scCs tt|t�o|jt@�S(u:Return true if the object is an abstract base class (ABC).(uboolu
isinstanceutypeu	__flags__uTPFLAGS_IS_ABSTRACT(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
isabstract�sc
Cs�t|�r"|ft|�}nd}g}x�t|�D]�}xY|D]&}||jkrH|j|}PqHqHWyt||�}Wntk
r�w;YnX|s�||�r;|j||f�q;q;W|j�|S(u�Return all members of an object as (name, value) pairs sorted by name.
    Optionally, only return members that satisfy a given predicate.((uisclassugetmroudiru__dict__ugetattruAttributeErroruappendusort(uobjectu	predicateumrouresultsukeyubaseuvalue((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
getmemberss"



u	Attributeuname kind defining_class objectc
Csbt|�}t|�}g}x=|D]5}d}x\|f|D],}||jkr?|j|}|}Pq?q?Wt||�}t|d|�}t|t�r�d}n�t|t�r�d}n~t|t�r�d}nft	|�r�d}nQt
|�rd}n<t||�}	t|	�s)t	|	�r2d}nd}|	}|jt
||||��q%W|S(u�Return list of attribute-descriptor tuples.

    For each name in dir(cls), the return list contains a 4-tuple
    with these elements:

        0. The name (a string).

        1. The kind of attribute this is, one of these strings:
               'class method'    created via classmethod()
               'static method'   created via staticmethod()
               'property'        created via property()
               'method'          any other flavor of method
               'data'            not a method

        2. The class which defined this attribute (a class).

        3. The object as obtained directly from the defining class's
           __dict__, not via getattr.  This is especially important for
           data attributes:  C.data is just a data object, but
           C.__dict__['data'] may be a data descriptor with additional
           info, like a __doc__ string.
    u__objclass__u
static methoduclass methodupropertyumethodudataN(ugetmroudiruNoneu__dict__ugetattru
isinstanceustaticmethoduclassmethodupropertyuismethoddescriptoruisdatadescriptoru
isfunctionuappendu	Attribute(
uclsumrounamesuresultunameuhomeclsubaseuobjukinduobj_via_getattr((u./usr/local/python-3.2/lib/python3.2/inspect.pyuclassify_class_attrss<

						 cCs|jS(uHReturn tuple of base classes (including cls) in method resolution order.(u__mro__(ucls((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetmrocscCs&|j�}t|�t|j��S(uBReturn the indent size, in spaces, at the start of a line of text.(u
expandtabsulenulstrip(ulineuexpline((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
indentsizehscCsCy
|j}Wntk
r%dSYnXt|t�s9dSt|�S(u�Get the documentation string for an object.

    All tabs are expanded to spaces.  To clean up docstrings that are
    indented to line up with blocks of code, any whitespace than can be
    uniformly removed from the second line onwards is removed.N(u__doc__uAttributeErroruNoneu
isinstanceustrucleandoc(uobjectudoc((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetdocms

	cCsOy|j�jd�}Wntk
r1dSYnXtj}xR|dd�D]@}t|j��}|rLt|�|}t||�}qLqLW|r�|dj�|d<n|tjkr�x8t	dt|��D]}|||d�||<q�Wnx|r|dr|j
�q�Wx"|r=|dr=|j
d�qWdj|�SdS(u�Clean up indentation from docstrings.

    Any whitespace that can be uniformly removed from the second line
    onwards is removed.u
iNii����(u
expandtabsusplituUnicodeErroruNoneusysumaxsizeulenulstripuminurangeupopujoin(udoculinesumarginulineucontentuindentui((u./usr/local/python-3.2/lib/python3.2/inspect.pyucleandoc{s(
		cCst|�r:t|d�r"|jStdj|���nt|�r�tjj|j	�}t|d�rq|jStdj|���nt
|�r�|j}nt|�r�|j
}nt|�r�|j}nt|�r�|j}nt|�r�|jStdj|���dS(u@Work out which source or compiled file an object was defined in.u__file__u{!r} is a built-in moduleu{!r} is a built-in classuO{!r} is not a module, class, method, function, traceback, frame, or code objectN(uismoduleuhasattru__file__u	TypeErroruformatuisclassusysumodulesugetu
__module__uismethodu__func__u
isfunctionu__code__uistracebackutb_frameuisframeuf_codeuiscodeuco_filename(uobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetfile�s*	u
ModuleInfouname suffix mode module_typecCs�tjj|�}d�tj�D�}|j�xM|D]E\}}}}||d�|kr9t|d|�|||�Sq9WdS(uDGet the module name, suffix, mode, and module type for a given file.cSs2g|](\}}}t|�|||f�qS((ulen(u.0usuffixumodeumtype((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
<listcomp>�s	N(uosupathubasenameuimpuget_suffixesusortu
ModuleInfo(upathufilenameusuffixesuneglenusuffixumodeumtype((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
getmoduleinfo�s
cCst|�}|r|dSdS(u1Return the module name for a given file, or None.iN(u
getmoduleinfo(upathuinfo((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
getmodulename�scCs�t|�}|dd�j�d	kr?|dd
�d}nxPtj�D]B\}}}d|krL|t|�d�j�|krLdSqLWtjj|�r�|St	t
||�d�r�|S|tjkr�|SdS(u�Return the filename that can be used to locate an object's source.
    Return None if no way can be identified to get the source.
    iNu.pycu.pyou.pyubu
__loader__i����(u.pycu.pyoi����(
ugetfileuloweruimpuget_suffixesulenuNoneuosupathuexistsuhasattru	getmoduleu	linecacheucache(uobjectufilenameusuffixumodeukind((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
getsourcefile�s/cCsC|dkr't|�p!t|�}ntjjtjj|��S(u�Return an absolute path to the source or compiled file for an object.

    The idea is for each object to have a unique origin, so this routine
    normalizes the result as much as possible.N(uNoneu
getsourcefileugetfileuosupathunormcaseuabspath(uobjectu	_filename((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
getabsfile�sc
Cst|�r|St|d�r2tjj|j�S|dk	r^|tkr^tjjt|�Syt||�}Wnt	k
r�dSYnX|tkr�tjjt|�Sx�t
tjj��D]�\}}t|�r�t|d�r�|j}|t
j|d�krq�n|t
|<t|�}|jt|<ttjj|�<q�q�W|tkrltjjt|�Stjd}t|d�s�dSt||j�r�t||j�}||kr�|Sntjd}t||j�rt||j�}	|	|kr|SndS(uAReturn the module an object was defined in, or None if not found.u
__module__u__file__u__main__u__name__ubuiltinsN(uismoduleuhasattrusysumodulesugetu
__module__uNoneu
modulesbyfileu
getabsfileu	TypeErrorulistuitemsu__file__u_filesbymodnameu__name__uosupathurealpathugetattr(
uobjectu	_filenameufileumodnameumoduleufumainu
mainobjectubuiltinu
builtinobject((u./usr/local/python-3.2/lib/python3.2/inspect.pyu	getmodule�sD
	"	
(

cCs�t|�}t|�}|rF|d|ddkrFtd��n|rR|n|}t||�}|r�tj||j�}ntj|�}|s�td��nt|�r�|dfSt|�r�|j	}t
jd|d�}g}xptt
|��D]\}|j||�}	|	r||ddkrA||fS|j|	jd�|f�qqW|r�|j�||ddfStd	��nt|�r�|j}nt|�r�|j}nt|�r�|j}nt|�r�|j}nt|�ryt|d
�std��n|jd}
t
jd�}x1|
dkrn|j||
�raPn|
d}
q>W||
fStd
��dS(ubReturn the entire source file and starting line number for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a list of all the lines
    in the file and the line number indexes a line in that list.  An IOError
    is raised if the source code cannot be retrieved.iiu<>usource code not availableucould not get source codeu^(\s*)class\s*u\bucucould not find class definitionuco_firstlinenou"could not find function definitionu+^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)ucould not find code objectNi����(ugetfileu
getsourcefileuIOErroru	getmoduleu	linecacheugetlinesu__dict__uismoduleuisclassu__name__ureucompileurangeulenumatchuappendugroupusortuismethodu__func__u
isfunctionu__code__uistracebackutb_frameuisframeuf_codeuiscodeuhasattruco_firstlineno(uobjectufileu
sourcefileumoduleulinesunameupatu
candidatesuiumatchulnum((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
findsources\
	
#


cCs�yt|�\}}Wnttfk
r4dSYnXt|�rEd}|rp|ddd�dkrpd}nx6|t|�kr�||j�dkr�|d}qsW|t|�kr�||dd�dkr�g}|}xQ|t|�kr4||dd�dkr4|j||j��|d}q�Wdj	|�Sn�|dkr�t
||�}|d}|dkr�||j�dd�dkr�t
||�|kr�||j�j�g}|dkrk|d}||j�j�}xv|dd�dkrgt
||�|krg|g|dd�<|d}|dkrNPn||j�j�}q�Wnx0|r�|dj�dkr�g|dd�<qnWx0|r�|d	j�dkr�g|d
d�<q�Wdj	|�SndS(uwGet lines of comments immediately preceding an object's source code.

    Returns None when source can't be found.
    iNiu#!iuu#(uu#i����i����(u
findsourceuIOErroru	TypeErroruNoneuismoduleulenustripuappendu
expandtabsujoinu
indentsizeulstrip(uobjectulinesulnumustartucommentsuenduindentucomment((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetcommentsRsJ	 	+,/
,
/
cBs|EeZdS(N(u__name__u
__module__(u
__locals__((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
EndOfBlocks
u
EndOfBlockcBs&|EeZdZd�Zd�ZdS(u@Provide a tokeneater() method to detect the end of a code block.cCs1d|_d|_d|_d|_d|_dS(NiiF(uindentuFalseuislambdaustartedupasslineulast(uself((u./usr/local/python-3.2/lib/python3.2/inspect.pyu__init__�s
				cCs$|jsE|dkr9|dkr-d|_nd|_nd|_n�|tjkrd|_|d|_|jr t�q n�|jr�n�|tj	kr�|j
d|_
d|_nj|tjkr�|j
d|_
|j
dkr t�q n0|j
dkr |tjtj
fkr t�ndS(	Nudefuclassulambdaii(udefuclassulambdaTF(ustarteduTrueuislambdaupasslineutokenizeuNEWLINEuFalseulastu
EndOfBlockuINDENTuindentuDEDENTuCOMMENTuNL(uselfutypeutokenusrowcoluerowcoluline((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
tokeneater�s,		
		'N(u__name__u
__module__u__doc__u__init__u
tokeneater(u
__locals__((u./usr/local/python-3.2/lib/python3.2/inspect.pyuBlockFinder�s
	uBlockFindercCsot�}y:tjt|�j�}x|D]}|j|�q+WWnttfk
r]YnX|d|j�S(u@Extract the block of code at the top of the given list of lines.N(	uBlockFinderutokenizeugenerate_tokensuiteru__next__u
tokeneateru
EndOfBlockuIndentationErrorulast(ulinesublockfinderutokensu_token((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetblock�s	
cCsJt|�\}}t|�r(|dfSt||d��|dfSdS(u�Return a list of source lines and starting line number for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a list of the lines
    corresponding to the object and the line number indicates where in the
    original source file the first line of code was found.  An IOError is
    raised if the source code cannot be retrieved.iNi(u
findsourceuismoduleugetblock(uobjectulinesulnum((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetsourcelines�s
cCst|�\}}dj|�S(uReturn the text of the source code for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a single string.  An
    IOError is raised if the source code cannot be retrieved.u(ugetsourcelinesujoin(uobjectulinesulnum((u./usr/local/python-3.2/lib/python3.2/inspect.pyu	getsource�scCsvg}|jdtdd��xP|D]H}|j||jf�||kr&|jt||||��q&q&W|S(u-Recursive helper function for getclasstree().ukeyu
__module__u__name__(usortu
attrgetteruappendu	__bases__uwalktree(uclassesuchildrenuparenturesultsuc((u./usr/local/python-3.2/lib/python3.2/inspect.pyuwalktree�s
$cCs�i}g}x�|D]�}|jryxp|jD]F}||krKg||<n||j|�|r,||kr,Pq,q,Wq||kr|j|�qqWx*|D]"}||kr�|j|�q�q�Wt||d�S(u�Arrange the given list of classes into a hierarchy of nested lists.

    Where a nested list appears, it contains classes derived from the class
    whose entry immediately precedes the list.  Each entry is a 2-tuple
    containing a class and a tuple of its base classes.  If the 'unique'
    argument is true, exactly one entry appears in the returned structure
    for each class in the given list.  Otherwise, classes using multiple
    inheritance and their descendants will appear multiple times.N(u	__bases__uappenduwalktreeuNone(uclassesuuniqueuchildrenurootsucuparent((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetclasstree�s 	
	

u	Argumentsuargs, varargs, varkwcCs,t|�\}}}}t||||�S(uGet information about the arguments accepted by a code object.

    Three things are returned: (args, varargs, varkw), where
    'args' is the list of argument names. Keyword-only arguments are
    appended. 'varargs' and 'varkw' are the names of the * and **
    arguments or None.(u_getfullargsu	Arguments(ucouargsuvarargsu
kwonlyargsuvarkw((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetargs�sc	Cs�t|�s$tdj|���n|j}|j}|j}t|d|��}t||||��}d}||7}d}|jt	@r�|j|}|d}nd}|jt
@r�|j|}n||||fS(uGet information about the arguments accepted by a code object.

    Four things are returned: (args, varargs, kwonlyargs, varkw), where
    'args' and 'kwonlyargs' are lists of argument names, and 'varargs'
    and 'varkw' are the names of the * and ** arguments or None.u{!r} is not a code objectNii(uiscodeu	TypeErroruformatuco_argcountuco_varnamesuco_kwonlyargcountulistuNoneuco_flagsu
CO_VARARGSuCO_VARKEYWORDS(	ucounargsunamesunkwargsuargsu
kwonlyargsustepuvarargsuvarkw((u./usr/local/python-3.2/lib/python3.2/inspect.pyu_getfullargs�s"			




uArgSpecuargs varargs keywords defaultscCsOt|�\}}}}}}}|s-|r<td��nt||||�S(uSGet the names and default values of a function's arguments.

    A tuple of four things is returned: (args, varargs, varkw, defaults).
    'args' is a list of the argument names.
    'args' will include keyword-only argument names.
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'defaults' is an n-tuple of the default values of the last n arguments.

    Use the getfullargspec() API for Python-3000 code, as annotations
    and keyword arguments are supported. getargspec() will raise ValueError
    if the func has either annotations or keyword arguments.
    ucFunction has keyword-only arguments or annotations, use getfullargspec() API which can support them(ugetfullargspecu
ValueErroruArgSpec(ufuncuargsuvarargsuvarkwudefaultsu
kwonlyargsukwonlydefaultsuann((u./usr/local/python-3.2/lib/python3.2/inspect.pyu
getargspecs!uFullArgSpecuGargs, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotationscCs|t|�r|j}nt|�s<tdj|���nt|j�\}}}}t||||j||j	|j
�S(u�Get the names and default values of a function's arguments.

    A tuple of seven things is returned:
    (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults annotations).
    'args' is a list of the argument names.
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'defaults' is an n-tuple of the default values of the last n arguments.
    'kwonlyargs' is a list of keyword-only argument names.
    'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults.
    'annotations' is a dictionary mapping argument names to annotations.

    The first four items in the tuple correspond to getargspec().
    u{!r} is not a Python function(uismethodu__func__u
isfunctionu	TypeErroruformatu_getfullargsu__code__uFullArgSpecu__defaults__u__kwdefaults__u__annotations__(ufuncuargsuvarargsu
kwonlyargsuvarkw((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetfullargspec0suArgInfouargs varargs keywords localscCs.t|j�\}}}t||||j�S(u9Get information about arguments passed into a particular frame.

    A tuple of four things is returned: (args, varargs, varkw, locals).
    'args' is a list of the argument names.
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'locals' is the locals dictionary of the given frame.(ugetargsuf_codeuArgInfouf_locals(uframeuargsuvarargsuvarkw((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetargvaluesIscCsGt|t�r=|jd|fkr+|jS|jd|jSt|�S(Nubuiltinsu.(u
isinstanceutypeu
__module__u__name__urepr(u
annotationubase_module((u./usr/local/python-3.2/lib/python3.2/inspect.pyuformatannotationSs
cs%t|dd���fd�}|S(Nu
__module__cs
t|��S(N(uformatannotation(u
annotation(umodule(u./usr/local/python-3.2/lib/python3.2/inspect.pyu_formatannotation\s(ugetattruNone(uobjectu_formatannotation((umoduleu./usr/local/python-3.2/lib/python3.2/inspect.pyuformatannotationrelativetoZscCsd|S(Nu*((uname((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>cscCsd|S(Nu**((uname((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>dscCsdt|�S(Nu=(urepr(uvalue((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>escCsd|S(Nu -> ((utext((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>fsc
s����fd�}
g}|r:t|�t|�}nx`t|�D]R\}}|
|�}|r�||kr�||
|||�}n|j|�qGW|dk	r�|j||
|���n|r�|jd�n|r7xS|D]H}|
|�}|r#||kr#||
||�7}n|j|�q�Wn|dk	r_|j|	|
|���nddj|�d}d�kr�||��d��7}n|S(u�Format an argument spec from the values returned by getargspec
    or getfullargspec.

    The first seven arguments are (args, varargs, varkw, defaults,
    kwonlyargs, kwonlydefaults, annotations).  The other five arguments
    are the corresponding optional formatting functions that are called to
    turn names and values into strings.  The last argument is an optional
    function to format the sequence of arguments.cs7�|�}|�kr3|d��|�7}n|S(Nu: ((uarguresult(uannotationsuformatannotationu	formatarg(u./usr/local/python-3.2/lib/python3.2/inspect.pyuformatargandannotationpsu*u(u, u)ureturnN(ulenu	enumerateuappenduNoneujoin(uargsuvarargsuvarkwudefaultsu
kwonlyargsukwonlydefaultsuannotationsu	formatargu
formatvarargsuformatvarkwuformatvalueu
formatreturnsuformatannotationuformatargandannotationuspecsufirstdefaultuiuarguspecu	kwonlyarguresult((uannotationsuformatannotationu	formatargu./usr/local/python-3.2/lib/python3.2/inspect.pyu
formatargspec`s2
cCsd|S(Nu*((uname((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>�scCsd|S(Nu**((uname((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>�scCsdt|�S(Nu=(urepr(uvalue((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<lambda>�scCs�|||d�}g}	x1tt|��D]}
|	j|||
��q+W|rv|	j||�|||��n|r�|	j||�|||��nddj|	�dS(ufFormat an argument spec from the 4 values returned by getargvalues.

    The first four arguments are (args, varargs, varkw, locals).  The
    next four arguments are the corresponding optional formatting functions
    that are called to turn names and values into strings.  The ninth
    argument is an optional function to format the sequence of arguments.cSs||�|||�S(N((unameulocalsu	formatarguformatvalue((u./usr/local/python-3.2/lib/python3.2/inspect.pyuconvert�su(u, u)(urangeulenuappendujoin(uargsuvarargsuvarkwulocalsu	formatargu
formatvarargsuformatvarkwuformatvalueuconvertuspecsui((u./usr/local/python-3.2/lib/python3.2/inspect.pyuformatargvalues�s$$cs�t|�}|\}}}}}}	}
|j}i�t|�rd|jdk	rd|jf|}nt|�}|t|�}
t|�}|r�t|�nd}x't||�D]\}}|�|<q�W|r	||kr�|||d��|<q�d�|<n�d|ko |knretd||r:dnd||dkrRdnd|
f��nY|dkr�|
r�|s�|r�|r�td	||
f��q�q�td
||
f��nxatj	||�D]M}||kr�|�krtd||f��q|j
|��|<q�q�WxZ|D]R}|�kr)y|	|�|<Wq{tk
rwtd||f��Yq{Xq)q)W|r�xDt||d�|�D]%\}}|�kr�|�|<q�q�Wn|r�|�|<n1|rtt
|��}td
||f��n|t�fd�|D��}|r�||}td||rUdnd||dkrmdnd|
f��n�S(u�Get the mapping of arguments to values.

    A dict is returned, with keys the function argument names (including the
    names of the * and ** arguments, if any), and values the respective bound
    values from 'positional' and 'named'.iNu)%s() takes %s %d positional %s (%d given)uat mostuexactlyiu	argumentsuargumentu4%s() takes exactly 0 positional arguments (%d given)u"%s() takes no arguments (%d given)u2%s() got multiple values for keyword argument '%s'u#%s() needs keyword-only argument %su,%s() got an unexpected keyword argument '%s'cs"g|]}|�kr|�qS(((u.0uarg(u	arg2value(u./usr/local/python-3.2/lib/python3.2/inspect.pyu
<listcomp>�s	u%s() takes %s %d %s (%d given)uat least((ugetfullargspecu__name__uismethodu__self__uNoneulenuzipu	TypeErroru	itertoolsuchainupopuKeyErrorunextuiter(ufuncu
positionalunameduspecuargsuvarargsuvarkwudefaultsu
kwonlyargsukwonlydefaultsuannuf_nameunum_posu	num_totalunum_argsunum_defaultsuarguvalueu	kwonlyargu
unexpectedu
unassignedunum_required((u	arg2valueu./usr/local/python-3.2/lib/python3.2/inspect.pyugetcallargs�sr	
%

'
 
%u	Tracebacku+filename lineno function code_context indexcCs5t|�r!|j}|j}n	|j}t|�sNtdj|���nt|�pct|�}|dkr|d|d}yt	|�\}}Wnt
k
r�d}}YqXt|d�}tdt
|t|�|��}||||�}|d|}n
d}}t|||jj||�S(u�Get information about a frame or traceback object.

    A tuple of five things is returned: the filename, the line number of
    the current line, the function name, a list of lines of context from
    the source code, and the index of the current line within that list.
    The optional second argument specifies the number of lines of context
    to return, which are centered around the current line.u'{!r} is not a frame or traceback objectiiiN(uistracebacku	tb_linenoutb_frameuf_linenouisframeu	TypeErroruformatu
getsourcefileugetfileu
findsourceuIOErroruNoneumaxuminulenu	Tracebackuf_codeuco_name(uframeucontextulinenoufilenameustartulinesulnumuindex((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetframeinfo�s&		
"
cCs|jS(uCGet the line number from a frame object, allowing for optimization.(uf_lineno(uframe((u./usr/local/python-3.2/lib/python3.2/inspect.pyu	getlinenoscCs=g}x0|r8|j|ft||��|j}q	W|S(u�Get a list of records for a frame and all higher (calling) frames.

    Each record contains a frame object, filename, line number, function
    name, a list of lines of context, and index within the context.(uappendugetframeinfouf_back(uframeucontextu	framelist((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetouterframess
	
cCs@g}x3|r;|j|jft||��|j}q	W|S(u�Get a list of records for a traceback's frame and all lower frames.

    Each record contains a frame object, filename, line number, function
    name, a list of lines of context, and index within the context.(uappendutb_frameugetframeinfoutb_next(utbucontextu	framelist((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetinnerframes"s
	 
cCs ttd�rtjd�SdS(u?Return the frame of the caller or None if this is not possible.u	_getframeiN(uhasattrusysu	_getframeuNone(((u./usr/local/python-3.2/lib/python3.2/inspect.pyucurrentframe-scCsttjd�|�S(u@Return a list of records for the stack above the caller's frame.i(ugetouterframesusysu	_getframe(ucontext((u./usr/local/python-3.2/lib/python3.2/inspect.pyustack1scCsttj�d|�S(uCReturn a list of records for the stack below the current exception.i(ugetinnerframesusysuexc_info(ucontext((u./usr/local/python-3.2/lib/python3.2/inspect.pyutrace5scCstjdj|�S(Nu__mro__(utypeu__dict__u__get__(uklass((u./usr/local/python-3.2/lib/python3.2/inspect.pyu_static_getmro>scCsDi}ytj|d�}Wntk
r0YnXtj||t�S(Nu__dict__(uobjectu__getattribute__uAttributeErrorudictugetu	_sentinel(uobjuattru
instance_dict((u./usr/local/python-3.2/lib/python3.2/inspect.pyu_check_instanceAs
cCsZxSt|�D]E}tt|��tkr
y|j|SWqRtk
rNYqRXq
q
WtS(N(u_static_getmrou_shadowed_dictutypeu	_sentinelu__dict__uKeyError(uklassuattruentry((u./usr/local/python-3.2/lib/python3.2/inspect.pyu_check_classJs
cCs+yt|�Wntk
r&dSYnXdS(NFT(u_static_getmrou	TypeErroruFalseuTrue(uobj((u./usr/local/python-3.2/lib/python3.2/inspect.pyu_is_typeSs

	c
Cs�tjd}xwt|�D]i}y|j|�d}Wntk
rKYqXt|�tjko||jdko||j|ks|SqWt	S(Nu__dict__(
utypeu__dict__u_static_getmrou__get__uKeyErrorutypesuGetSetDescriptorTypeu__name__u__objclass__u	_sentinel(uklassu	dict_attruentryu
class_dict((u./usr/local/python-3.2/lib/python3.2/inspect.pyu_shadowed_dictZs

cCsut}t|�s`t|�}t|�}|tksKt|�tjkrft||�}qfn|}t||�}|tk	r�|tk	r�tt|�d�tk	r�tt|�d�tk	r�|Sn|tk	r�|S|tk	r�|S||krUx\tt|��D]E}tt|��tkr	y|j	|SWqNt
k
rJYqNXq	q	Wn|tk	re|St|��dS(u�Retrieve attributes without triggering dynamic lookup via the
       descriptor protocol,  __getattr__ or __getattribute__.

       Note: this function may not be able to retrieve all attributes
       that getattr can fetch (like dynamically created attributes)
       and may find attributes that getattr can't (like descriptors
       that raise AttributeError). It can also return descriptor objects
       instead of instance members in some cases. See the
       documentation for details.
    u__get__u__set__N(u	_sentinelu_is_typeutypeu_shadowed_dictutypesuMemberDescriptorTypeu_check_instanceu_check_classu_static_getmrou__dict__uKeyErroruAttributeError(uobjuattrudefaultuinstance_resultuklassu	dict_attruklass_resultuentry((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetattr_statichs6
uGEN_CREATEDuGEN_RUNNINGu
GEN_SUSPENDEDu
GEN_CLOSEDcCs:|jr
tS|jdkr tS|jjdkr6tStS(u#Get current state of a generator-iterator.

    Possible states are:
      GEN_CREATED: Waiting to start execution.
      GEN_RUNNING: Currently being executed by the interpreter.
      GEN_SUSPENDED: Currently suspended at a yield expression.
      GEN_CLOSED: Execution has completed.
    iNi����(u
gi_runninguGEN_RUNNINGugi_frameuNoneu
GEN_CLOSEDuf_lastiuGEN_CREATEDu
GEN_SUSPENDED(u	generator((u./usr/local/python-3.2/lib/python3.2/inspect.pyugetgeneratorstate�s		(ii(ii(ii i@iF((ru__doc__u
__author__u__date__usysuosutypesu	itertoolsustringureuimputokenizeu	linecacheuoperatoru
attrgetterucollectionsu
namedtupleudisuCOMPILER_FLAG_NAMESu_flag_namesuImportErroruCO_OPTIMIZEDuCO_NEWLOCALSu
CO_VARARGSuCO_VARKEYWORDSu	CO_NESTEDuCO_GENERATORu	CO_NOFREEuglobalsumod_dictuitemsukuvuTPFLAGS_IS_ABSTRACTuismoduleuisclassuismethoduismethoddescriptoruisdatadescriptoruhasattruismemberdescriptoruisgetsetdescriptoru
isfunctionuisgeneratorfunctionuisgeneratoruistracebackuisframeuiscodeu	isbuiltinu	isroutineu
isabstractuNoneu
getmembersu	Attributeuclassify_class_attrsugetmrou
indentsizeugetdocucleandocugetfileu
ModuleInfou
getmoduleinfou
getmodulenameu
getsourcefileu
getabsfileu
modulesbyfileu_filesbymodnameu	getmoduleu
findsourceugetcommentsu	Exceptionu
EndOfBlockuBlockFinderugetblockugetsourcelinesu	getsourceuwalktreeuFalseugetclasstreeu	Argumentsugetargsu_getfullargsuArgSpecu
getargspecuFullArgSpecugetfullargspecuArgInfougetargvaluesuformatannotationuformatannotationrelativetoustru
formatargspecuformatargvaluesugetcallargsu	Tracebackugetframeinfou	getlinenougetouterframesugetinnerframesucurrentframeustackutraceuobjectu	_sentinelu_static_getmrou_check_instanceu_check_classu_is_typeu_shadowed_dictugetattr_staticuGEN_CREATEDuGEN_RUNNINGu
GEN_SUSPENDEDu
GEN_CLOSEDugetgeneratorstate(((u./usr/local/python-3.2/lib/python3.2/inspect.pyu<module>s�
					
					
				
							F						
			.	C	-'		
	
	
	
					
			)	I!										.
© 2025 GrazzMean