tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
L\¬Qc    @sÎdZdZdZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl m Z ddlmZd^\ZZZZd_\ZZZd`Zd„Zd„Zd„Zd„Zd„Zeedƒr d„Zn    d„Zeedƒr1d„Zn    d„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d „Z&d!„Z'd"„Z(dd#„Z*ed$d%ƒZ+d&„Z,d'„Z-d(„Z.d)„Z/d*„Z0d+„Z1d,„Z2ed-d.ƒZ3d/„Z4d0„Z5d1„Z6dd2„Z7iZ8iZ9dd3„Z:d4„Z;d5„Z<d6e=fd7„ƒYZ>d8dad9„ƒYZ?d:„Z@d;„ZAd<„ZBd=„ZCd>d?„ZDed@dAƒZEdB„ZFedCdDƒZGdE„ZHedFdGƒZIdH„ZJdI„ZKeKdJ„ZLdddeMdK„dL„dM„eKdN„ZNeMdO„dP„dQ„eKdR„ZOdS„ZPedTdUƒZQddV„ZRdW„ZSddX„ZTddY„ZUeedZƒr¦ejVZWn dd[„ZWdd\„ZXdd]„ZYdS(bs²Get useful information from live Python objects.
 
This module encapsulates the interface provided by the internal special
attributes (func_*, 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
    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
sKa-Ping Yee <ping@lfw.org>s
1 Jan 2001iÿÿÿÿN(t
attrgetter(t
namedtupleiiiiii i@icCst|tjƒS(sÁReturn true if the object is a module.
 
    Module objects provide these attributes:
        __doc__         documentation string
        __file__        filename (missing for built-in modules)(t
isinstancettypest
ModuleType(tobject((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytismodule3scCst|ttjfƒS(sÆ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(RttypeRt    ClassType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytisclass;scCst|tjƒS(sª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
        im_class        class object in which this method belongs
        im_func         function object containing implementation of method
        im_self         instance to which this method is bound, or None(RRt
MethodType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytismethodCs    cCsDt|dƒoCt|dƒ oCt|ƒ oCt|ƒ oCt|ƒ S(s•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
    im_func attribute (etc) when an object passes ismethod().t__get__t__set__(thasattrR t
isfunctionR    (R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytismethoddescriptorNs
  cCst|dƒot|dƒS(s€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.R R (R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytisdatadescriptorbstMemberDescriptorTypecCst|tjƒS(sReturn true if the object is a member descriptor.
 
        Member descriptors are specialized descriptors defined in extension
        modules.(RRR(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytismemberdescriptornscCstS(sReturn true if the object is a member descriptor.
 
        Member descriptors are specialized descriptors defined in extension
        modules.(tFalse(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRvstGetSetDescriptorTypecCst|tjƒS(sReturn true if the object is a getset descriptor.
 
        getset descriptors are specialized descriptors defined in extension
        modules.(RRR(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytisgetsetdescriptorscCstS(sReturn true if the object is a getset descriptor.
 
        getset descriptors are specialized descriptors defined in extension
        modules.(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyR‡scCst|tjƒS(sReturn 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
        func_code       code object containing compiled function bytecode
        func_defaults   tuple of any default values for arguments
        func_doc        (same as __doc__)
        func_globals    global namespace in which this function was defined
        func_name       (same as __name__)(RRt FunctionType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRŽs cCs,tt|ƒst|ƒo(|jjt@ƒS(s¸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.(tboolRR t    func_codetco_flagst CO_GENERATOR(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytisgeneratorfunction›scCst|tjƒS(s 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(RRt GeneratorType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt isgenerator¤scCst|tjƒS(sbReturn 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)(RRt TracebackType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt istracebackµscCst|tjƒS(s|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_exc_traceback traceback if raised in this frame, or None
        f_exc_type      exception type if raised in this frame, or None
        f_exc_value     exception value if raised in this frame, or None
        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_restricted    0 or 1 if frame is in restricted execution mode
        f_trace         tracing function for this frame, or None(RRt    FrameType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytisframe¿scCst|tjƒS(suReturn 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(RRtCodeType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytiscodeÑscCst|tjƒS(s,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(RRtBuiltinFunctionType(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt    isbuiltinãscCs.t|ƒp-t|ƒp-t|ƒp-t|ƒS(s<Return true if the object is any kind of function or method.(R&RR R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt    isroutineìs   cCs tt|tƒo|jt@ƒS(s:Return true if the object is an abstract base class (ABC).(RRRt    __flags__tTPFLAGS_IS_ABSTRACT(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
isabstractóscCs~g}xgt|ƒD]Y}yt||ƒ}Wntk
rBqnX| sV||ƒr|j||fƒqqW|jƒ|S(sŠReturn all members of an object as (name, value) pairs sorted by name.
    Optionally, only return members that satisfy a given predicate.(tdirtgetattrtAttributeErrortappendtsort(Rt    predicatetresultstkeytvalue((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
getmembers÷s 
t    Attributesname 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(s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.
    t __objclass__s static methods class methodtpropertytmethodtdataN(tgetmroR+tNonet__dict__R,Rt staticmethodt classmethodR7RRR R.R5(
tclstmrotnamestresulttnamethomeclstbasetobjtkindtobj_via_getattr((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytclassify_class_attrss<                                 cCsB||krdS|j|ƒx|jD]}t||ƒq'WdS(N(R.t    __bases__t _searchbases(R?taccumRE((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRKLs
  cCs7t|dƒr|jSg}t||ƒt|ƒSdS(sHReturn tuple of base classes (including cls) in method resolution order.t__mro__N(RRMRKttuple(R?RB((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyR:Ts
 cCs,tj|ƒ}t|ƒttj|ƒƒS(sBReturn the indent size, in spaces, at the start of a line of text.(tstringt
expandtabstlentlstrip(tlinetexpline((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
indentsize^scCsBy |j}Wntk
r!dSXt|tjƒs8dSt|ƒS(sù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(t__doc__R-R;RRt StringTypestcleandoc(Rtdoc((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetdoccs  cCsKytjtj|ƒdƒ}Wntk
r3dSXtj}xO|dD]C}ttj|ƒƒ}|rHt|ƒ|}t    ||ƒ}qHqHW|r¬|djƒ|d<n|tjkrðx2t
dt|ƒƒD]}|||||<qÑWnx|r|d r|j ƒqóWx"|r6|d r6|j dƒqWtj |dƒSdS(s„Clean up indentation from docstrings.
 
    Any whitespace that can be uniformly removed from the second line
    onwards is removed.s
iiiÿÿÿÿN( ROtsplitRPt UnicodeErrorR;tsystmaxintRQRRtmintrangetpoptjoin(RYtlinestmarginRStcontenttindentti((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRXqs(     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(s@Work out which source or compiled file an object was defined in.t__file__s{!r} is a built-in modules{!r} is a built-in classsO{!r} is not a module, class, method, function, traceback, frame, or code objectN(RRRht    TypeErrortformatR    R]tmodulestgett
__module__R tim_funcRRR ttb_frameR"tf_codeR$t co_filename(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetfileŽs*               t
ModuleInfosname suffix mode module_typecCs|tjj|ƒ}td„tjƒƒ}|jƒxA|D]9\}}}}|||kr;t|| |||ƒSq;WdS(sDGet the module name, suffix, mode, and module type for a given file.cSs't|dƒ |d|d|dfS(Niii(RQ(tinfo((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt<lambda>«sN(tostpathtbasenametmaptimpt get_suffixesR/Rs(Rwtfilenametsuffixestneglentsuffixtmodetmtype((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getmoduleinfo¨s    
cCst|ƒ}|r|dSdS(s1Return the module name for a given file, or None.iN(R‚(RwRt((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getmodulename³s cCsÏt|ƒ}tj|dƒdkr6|d d}nxMtjƒD]?\}}}d|krCtj|t|ƒ ƒ|krCdSqCWtjj    |ƒrœ|St
t ||ƒdƒr¸|S|t j krË|SdS(    s†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.
    iüÿÿÿs.pycs.pyos.pytbt
__loader__N(s.pycs.pyo(RrROtlowerRzR{RQR;RvRwtexistsRt    getmodulet    linecachetcache(RR|RR€RG((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getsourcefile¸s ,cCsC|dkr't|ƒp!t|ƒ}ntjjtjj|ƒƒS(s¾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(R;R‹RrRvRwtnormcasetabspath(Rt    _filename((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
getabsfileÌs c
Cst|ƒr|St|dƒr2tjj|jƒS|dk    r^|tkr^tjjt|ƒSyt||ƒ}Wnt    k
r…dSX|tkr¦tjjt|ƒSx™tjj
ƒD]ˆ\}}t|ƒr¶t|dƒr¶|j }|t j|dƒkrq¶n|t |<t|ƒ}|j t|<ttjj|ƒ<q¶q¶W|tkrbtjjt|ƒStjd}t|dƒs‚dSt||j ƒr¹t||j ƒ}||kr¹|Sntjd}t||j ƒrýt||j ƒ}    |    |krý|SndS(sAReturn the module an object was defined in, or None if not found.RmRht__main__t__name__t __builtin__N(RRR]RkRlRmR;t modulesbyfileRRititemsRht_filesbymodnameR‘RvRwtrealpathR,(
RRŽtfiletmodnametmoduletftmaint
mainobjecttbuiltint builtinobject((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRˆØsD       
 (     c Cs‰t|ƒ}t|ƒ}| rF|d |ddkrFtdƒ‚n|rR|n|}t||ƒ}|r…tj||jƒ}ntj|ƒ}|s©tdƒ‚nt|ƒr¿|dfSt|ƒr•|j    }t
j d|dƒ}g}xpt t |ƒƒD]\}|j||ƒ}    |    r||dd    krA||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
j d ƒ}x1|
dkrn|j||
ƒraPn|
d}
q>W||
fStdƒ‚dS(sbReturn 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.iiÿÿÿÿs<>ssource code not availablescould not get source codeis^(\s*)class\s*s\btcscould not find class definitiontco_firstlinenos"could not find function definitions+^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)scould not find code objectN(RrR‹tIOErrorRˆR‰tgetlinesR<RR    R‘tretcompileR`RQtmatchR.tgroupR/R RnRRR RoR"RpR$RR ( RR—t
sourcefileR™RcRCtpatt
candidatesRgR¥tlnum((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
findsources\   
     
#
 
cCsØyt|ƒ\}}Wnttfk
r0dSXt|ƒr8d}|rf|dd dkrfd}nx9|t|ƒkr¡tj||ƒd    kr¡|d}qiW|t|ƒkrÔ||d dkrÔg}|}xN|t|ƒkr$||d dkr$|jtj    ||ƒƒ|d}q×Wtj
|dƒSnœ|dkrÔt ||ƒ}|d}|dkrÔtj ||ƒd dkrÔt ||ƒ|krÔtj tj    ||ƒƒg}|dkra|d}tj tj    ||ƒƒ}xp|d dkr]t ||ƒ|kr]|g|d*|d}|dkr>Pntj tj    ||ƒƒ}qñWnx-|rtj|dƒdkrg|d*qdWx-|rÀtj|dƒdkrÀg|d)q”Wtj
|dƒSndS(
swGet lines of comments immediately preceding an object's source code.
 
    Returns None when source can't be found.
    iis#!itt#iÿÿÿÿN(R¬R­( R«R¡RiR;RRQROtstripR.RPRbRURR(RRcRªtstarttcommentstendRftcomment((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getcommentsIsJ     .&) 
) 
) 
 #""t
EndOfBlockcBseZRS((R‘Rm(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyR´vst BlockFindercBs eZdZd„Zd„ZRS(s@Provide a tokeneater() method to detect the end of a code block.cCs1d|_t|_t|_t|_d|_dS(Nii(RfRtislambdatstartedtpasslinetlast(tself((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt__init__zs
                c
Cs8|\}}|\}}    |js]|dkrQ|dkrEt|_nt|_nt|_n×|tjkr“t|_||_|jr4t‚q4n¡|jrŸn•|tj    krÊ|j
d|_
t|_nj|tj kr|j
d|_
|j
dkr4t‚q4n0|j
dkr4|tj tj fkr4t‚ndS(Ntdeftclasstlambdaii(R¼R½slambda(R·tTrueR¶R¸ttokenizetNEWLINERR¹R´tINDENTRftDEDENTtCOMMENTtNL(
RºRttokent    srow_scolt    erow_ecolRStsrowtscolterowtecol((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
tokeneaters0                              '(R‘RmRVR»RÍ(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRµxs    cCsNtƒ}y tjt|ƒj|jƒWnttfk
rBnX||j S(s@Extract the block of code at the top of the given list of lines.(RµRÀtitertnextRÍR´tIndentationErrorR¹(Rct blockfinder((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetblock¡s      cCsDt|ƒ\}}t|ƒr(|dfSt||ƒ|dfSdS(s£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.iiN(R«RRÒ(RRcRª((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetsourcelinesªs
cCs"t|ƒ\}}tj|dƒS(sReturn 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.R¬(RÓRORb(RRcRª((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt    getsource·scCsvg}|jdtddƒƒxP|D]H}|j||jfƒ||kr&|jt||||ƒƒq&q&W|S(s-Recursive helper function for getclasstree().R2RmR‘(R/RR.RJtwalktree(tclassestchildrentparentR1RŸ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRÕÁs  $icCsÖ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(sö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(RJR.RÕR;(RÖtuniqueR×trootsRŸRØ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getclasstreeËs                t    Argumentssargs varargs keywordscCsft|ƒs$tdj|ƒƒ‚n|j}|j}t|| ƒ}d}x·t|ƒD]©}||d d krYggg}}}xg|t|jƒkrðt    |j|ƒ}    |d}|    t
j krŠt
j |    }
t    |j|ƒt    |j|dƒd} |d}|
d kr7|j | ƒ|j | ƒqí|
d
krí|j || ƒ|so|dg|d<Pqê|d d|d <xY|d dkrÜ|jƒ|jƒ} || g|| )|sÇPn|d d|d <q„W|sêPqêqíqŠqŠW|d||<qYqYWd} |jt@r3|j|} |d}nd}|jt@rV|j|}nt|| |ƒS(sGet information about the arguments accepted by a code object.
 
    Three things are returned: (args, varargs, varkw), where 'args' is
    a list of argument names (possibly containing nested lists), and
    'varargs' and 'varkw' are the names of the * and ** arguments or None.s{!r} is not a code objectiiR¬t.iit UNPACK_TUPLEtUNPACK_SEQUENCEt
STORE_FASTiÿÿÿÿ(R¬RÝ(RÞRßN(R$RiRjt co_argcountt co_varnamestlistR`RQtco_codetordtdist HAVE_ARGUMENTtopnameR.RaR;Rt
CO_VARARGStCO_VARKEYWORDSRÜ(tcotnargsRAtargststepRgtstacktremaintcounttopRèR3tsizetvarargstvarkw((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetargsçsV         
 ,
 
     tArgSpecsargs varargs keywords defaultscCsjt|ƒr|j}nt|ƒs<tdj|ƒƒ‚nt|jƒ\}}}t||||jƒS(slGet 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 (it may contain nested lists).
    '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.
    s{!r} is not a Python function(    R RnRRiRjRöRR÷t func_defaults(tfuncRíRôRõ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt
getargspec#s       tArgInfosargs varargs keywords localscCs.t|jƒ\}}}t||||jƒS(sWGet 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 (it may contain nested lists).
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'locals' is the locals dictionary of the given frame.(RöRpRûtf_locals(tframeRíRôRõ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getargvalues5scCs>t|ƒdkr"d|ddSdtj|dƒdSdS(Nit(is,)s, t)(RQRORb(tseq((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytjoinseq?scCsBt|ƒttfkr4|t||d„|ƒƒS||ƒSdS(s7Recursively walk a sequence, stringifying each element.cSst|||ƒS(N(tstrseq(toRŸtj((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuHsN(RRãRNRy(RtconvertRb((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyREscCsd|S(Nt*((RC((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuNscCsd|S(Ns**((RC((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuOscCsdt|ƒS(Nt=(trepr(R3((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuPsc    Csêg}    |r%t|ƒt|ƒ}
nxft|ƒD]X\} } t| ||ƒ} |r}| |
kr}| ||| |
ƒ} n|    j| ƒq2W|dk    r°|    j||ƒƒn|dk    rÒ|    j||ƒƒndtj|    dƒdS(sgFormat an argument spec from the 4 values returned by getargspec.
 
    The first four arguments are (args, varargs, varkw, defaults).  The
    other 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.Rÿs, RN(RQt    enumerateRR.R;RORb(RíRôRõtdefaultst    formatargt formatvarargst formatvarkwt formatvalueRbtspecst firstdefaultRgtargtspec((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt formatargspecLs   cCsd|S(NR((RC((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuhscCsd|S(Ns**((RC((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuiscCsdt|ƒS(NR(R    (R3((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRujsc     Cs¾|||d„}    g}
x7tt|ƒƒD]#} |
jt|| |    |ƒƒq+W|r||
j||ƒ|||ƒƒn|r¦|
j||ƒ|||ƒƒndtj|
dƒdS(sfFormat 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((RCtlocalsR R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRrsRÿs, R(R`RQR.RRORb( RíRôRõRR R RRRbRRRg((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytformatargvaluesfs !$$c
st|ƒ\}}}}|j}i‰g‰‡‡‡fd†‰‡‡fd†}t|ƒr‚|jdk    r‚|jf|}nt|ƒ}    |    t|ƒ}
t|ƒ} |r¼t|ƒnd} x*t||ƒD]\} }ˆ| |ƒqÒW|r*|    | krˆ|||    |  ƒqÙˆ|dƒn¯d| koA|    knr†td||r[dnd| | dkrsdnd    |
fƒ‚nS| dkrÙ|
rÙ|rÀ|    rÖtd
||
fƒ‚qÖqÙtd ||
fƒ‚nxg|D]_} t| t    ƒrà| |krà|| ƒr&td || fƒ‚q?ˆ| |j
| ƒƒqàqàW|rxAt|| |ƒD](\} }|| ƒs^ˆ| |ƒq^q^Wn|r£ˆ||ƒn[|rþt t |ƒƒ}t|t ƒrå|jtjƒd ƒ}ntd||fƒ‚n| tg|D]} || ƒr | ^q ƒ}|r}| | }td||rRdnd||dkrjdnd    |
fƒ‚nˆS(sí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'.csÝt|tƒr|ˆ|<n½ˆj|ƒt|ƒ}xst|ƒD]e\}}yt|ƒ}Wn9tk
r™td||dkr‰dndfƒ‚nXˆ||ƒqBWyt|ƒWntk
rÌn Xtdƒ‚dS(Nsneed more than %d %s to unpackitvaluesR3stoo many values to unpack(RtstrR.RÎR
RÏt StopIterationt
ValueError(RR3Rgtsubargtsubvalue(t    arg2valuetassigntassigned_tuple_params(sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRŠs     & cs#t|tƒr|ˆkS|ˆkS(N(RR(R(RR(sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt is_assigneds
is%s() takes %s %d %s (%d given)sat mosttexactlyit    argumentstarguments)%s() takes exactly 0 arguments (%d given)s"%s() takes no arguments (%d given)s2%s() got multiple values for keyword argument '%s'treplaces,%s() got an unexpected keyword argument '%s'sat leastN((RúR‘R tim_selfR;RQtzipRiRRRaRÏRÎtunicodetencodeR]tgetdefaultencoding(Rùt
positionaltnamedRíRôRõR tf_nameR tnum_post    num_totaltnum_argst num_defaultsRR3t
unexpectedt
unassignedt num_required((RRRsO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getcallargs~sl       %  ! /
%t    Tracebacks+filename lineno function code_context indexcCs1t|ƒr!|j}|j}n    |j}t|ƒsNtdj|ƒƒ‚nt|ƒpct|ƒ}|dkr |d|d}yt    |ƒ\}}Wnt
k
r·d}}qXt |dƒ}t dt |t|ƒ|ƒƒ}||||!}|d|}n
d}}t|||jj||ƒS(s“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.s'{!r} is not a frame or traceback objectiiiN(R t    tb_linenoRotf_linenoR"RiRjR‹RrR«R¡R;tmaxR_RQR5Rptco_name(RýtcontexttlinenoR|R¯RcRªtindex((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt getframeinfoÛs&             "
cCs|jS(sCGet the line number from a frame object, allowing for optimization.(R7(Rý((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt    getlinenoüscCs=g}x0|r8|j|ft||ƒƒ|j}q    W|S(sÐ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.(R.R=tf_back(RýR:t    framelist((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetouterframess
     cCs@g}x3|r;|j|jft||ƒƒ|j}q    W|S(sÑ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.(R.RoR=ttb_next(ttbR:R@((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pytgetinnerframes s
      t    _getframecCsdS(N(R;(t_((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRuscCsttjdƒ|ƒS(s@Return a list of records for the stack above the caller's frame.i(RAR]RE(R:((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyRïscCsttjƒd|ƒS(sCReturn a list of records for the stack below the current exception.i(RDR]texc_info(R:((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyttrace s(iiii(ii i@i((ZRVt
__author__t__date__R]RvRROR£RæRzRÀR‰toperatorRt collectionsRt CO_OPTIMIZEDt CO_NEWLOCALSRéRêt    CO_NESTEDRt    CO_NOFREER)RR    R RRRRRRRRR R"R$R&R'R*R;R4R5RIRKR:RURZRXRrRsR‚RƒR‹RR“R•RˆR«R³t    ExceptionR´RµRÒRÓRÔRÕRÛRÜRöR÷RúRûRþRRRRRR4R5R=R>RARDREt currentframeRïRH(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/inspect.pyt<module>s¸                             
                              
                            E        
                                .    C    -)                
   
    :        
              [ !