1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric5.UtilitiesPython2.py2flakes.checker</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric5.UtilitiesPython2.py2flakes.checker</h1> |
|
23 |
|
24 <h3>Global Attributes</h3> |
|
25 <table> |
|
26 <tr><td>_MAGIC_GLOBALS</td></tr> |
|
27 </table> |
|
28 <h3>Classes</h3> |
|
29 <table> |
|
30 <tr> |
|
31 <td><a href="#Argument">Argument</a></td> |
|
32 <td>Represents binding a name as an argument.</td> |
|
33 </tr><tr> |
|
34 <td><a href="#Assignment">Assignment</a></td> |
|
35 <td>Represents binding a name with an explicit assignment.</td> |
|
36 </tr><tr> |
|
37 <td><a href="#Binding">Binding</a></td> |
|
38 <td>Represents the binding of a value to a name.</td> |
|
39 </tr><tr> |
|
40 <td><a href="#Checker">Checker</a></td> |
|
41 <td>Class to check the cleanliness and sanity of Python code.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#ClassScope">ClassScope</a></td> |
|
44 <td>Class representing a name scope for a class.</td> |
|
45 </tr><tr> |
|
46 <td><a href="#ExportBinding">ExportBinding</a></td> |
|
47 <td>A binding created by an __all__ assignment.</td> |
|
48 </tr><tr> |
|
49 <td><a href="#FunctionDefinition">FunctionDefinition</a></td> |
|
50 <td>Represents a function definition.</td> |
|
51 </tr><tr> |
|
52 <td><a href="#FunctionScope">FunctionScope</a></td> |
|
53 <td>Class representing a name scope for a function.</td> |
|
54 </tr><tr> |
|
55 <td><a href="#Importation">Importation</a></td> |
|
56 <td>A binding created by an import statement.</td> |
|
57 </tr><tr> |
|
58 <td><a href="#ModuleScope">ModuleScope</a></td> |
|
59 <td>Class representing a name scope for a module.</td> |
|
60 </tr><tr> |
|
61 <td><a href="#Scope">Scope</a></td> |
|
62 <td>Class defining the scope base class.</td> |
|
63 </tr><tr> |
|
64 <td><a href="#UnBinding">UnBinding</a></td> |
|
65 <td>Created by the 'del' operator.</td> |
|
66 </tr> |
|
67 </table> |
|
68 <h3>Functions</h3> |
|
69 <table> |
|
70 <tr> |
|
71 <td><a href="#iter_child_nodes">iter_child_nodes</a></td> |
|
72 <td>Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes.</td> |
|
73 </tr> |
|
74 </table> |
|
75 <hr /><hr /> |
|
76 <a NAME="Argument" ID="Argument"></a> |
|
77 <h2>Argument</h2> |
|
78 <p> |
|
79 Represents binding a name as an argument. |
|
80 </p> |
|
81 <h3>Derived from</h3> |
|
82 Binding |
|
83 <h3>Class Attributes</h3> |
|
84 <table> |
|
85 <tr><td>None</td></tr> |
|
86 </table> |
|
87 <h3>Class Methods</h3> |
|
88 <table> |
|
89 <tr><td>None</td></tr> |
|
90 </table> |
|
91 <h3>Methods</h3> |
|
92 <table> |
|
93 <tr><td>None</td></tr> |
|
94 </table> |
|
95 <h3>Static Methods</h3> |
|
96 <table> |
|
97 <tr><td>None</td></tr> |
|
98 </table> |
|
99 |
|
100 <div align="right"><a href="#top">Up</a></div> |
|
101 <hr /><hr /> |
|
102 <a NAME="Assignment" ID="Assignment"></a> |
|
103 <h2>Assignment</h2> |
|
104 <p> |
|
105 Represents binding a name with an explicit assignment. |
|
106 </p><p> |
|
107 The checker will raise warnings for any Assignment that isn't used. Also, |
|
108 the checker does not consider assignments in tuple/list unpacking to be |
|
109 Assignments, rather it treats them as simple Bindings. |
|
110 </p> |
|
111 <h3>Derived from</h3> |
|
112 Binding |
|
113 <h3>Class Attributes</h3> |
|
114 <table> |
|
115 <tr><td>None</td></tr> |
|
116 </table> |
|
117 <h3>Class Methods</h3> |
|
118 <table> |
|
119 <tr><td>None</td></tr> |
|
120 </table> |
|
121 <h3>Methods</h3> |
|
122 <table> |
|
123 <tr><td>None</td></tr> |
|
124 </table> |
|
125 <h3>Static Methods</h3> |
|
126 <table> |
|
127 <tr><td>None</td></tr> |
|
128 </table> |
|
129 |
|
130 <div align="right"><a href="#top">Up</a></div> |
|
131 <hr /><hr /> |
|
132 <a NAME="Binding" ID="Binding"></a> |
|
133 <h2>Binding</h2> |
|
134 <p> |
|
135 Represents the binding of a value to a name. |
|
136 </p><p> |
|
137 The checker uses this to keep track of which names have been bound and |
|
138 which names have not. See L{Assignment} for a special type of binding that |
|
139 is checked with stricter rules. |
|
140 </p> |
|
141 <h3>Derived from</h3> |
|
142 object |
|
143 <h3>Class Attributes</h3> |
|
144 <table> |
|
145 <tr><td>None</td></tr> |
|
146 </table> |
|
147 <h3>Class Methods</h3> |
|
148 <table> |
|
149 <tr><td>None</td></tr> |
|
150 </table> |
|
151 <h3>Methods</h3> |
|
152 <table> |
|
153 <tr> |
|
154 <td><a href="#Binding.__init__">Binding</a></td> |
|
155 <td></td> |
|
156 </tr><tr> |
|
157 <td><a href="#Binding.__repr__">__repr__</a></td> |
|
158 <td></td> |
|
159 </tr><tr> |
|
160 <td><a href="#Binding.__str__">__str__</a></td> |
|
161 <td></td> |
|
162 </tr> |
|
163 </table> |
|
164 <h3>Static Methods</h3> |
|
165 <table> |
|
166 <tr><td>None</td></tr> |
|
167 </table> |
|
168 <a NAME="Binding.__init__" ID="Binding.__init__"></a> |
|
169 <h4>Binding (Constructor)</h4> |
|
170 <b>Binding</b>(<i>name, source</i>) |
|
171 <a NAME="Binding.__repr__" ID="Binding.__repr__"></a> |
|
172 <h4>Binding.__repr__</h4> |
|
173 <b>__repr__</b>(<i></i>) |
|
174 <a NAME="Binding.__str__" ID="Binding.__str__"></a> |
|
175 <h4>Binding.__str__</h4> |
|
176 <b>__str__</b>(<i></i>) |
|
177 |
|
178 <div align="right"><a href="#top">Up</a></div> |
|
179 <hr /><hr /> |
|
180 <a NAME="Checker" ID="Checker"></a> |
|
181 <h2>Checker</h2> |
|
182 <p> |
|
183 Class to check the cleanliness and sanity of Python code. |
|
184 </p> |
|
185 <h3>Derived from</h3> |
|
186 object |
|
187 <h3>Class Attributes</h3> |
|
188 <table> |
|
189 <tr><td>AND</td></tr><tr><td>BITOR</td></tr><tr><td>BOOLOP</td></tr><tr><td>CALL</td></tr><tr><td>COMPREHENSION</td></tr><tr><td>CONTINUE</td></tr><tr><td>EQ</td></tr><tr><td>GENERATOREXP</td></tr><tr><td>LOAD</td></tr><tr><td>NUM</td></tr><tr><td>RETURN</td></tr><tr><td>SLICE</td></tr><tr><td>nodeDepth</td></tr><tr><td>scope</td></tr><tr><td>traceTree</td></tr> |
|
190 </table> |
|
191 <h3>Class Methods</h3> |
|
192 <table> |
|
193 <tr><td>None</td></tr> |
|
194 </table> |
|
195 <h3>Methods</h3> |
|
196 <table> |
|
197 <tr> |
|
198 <td><a href="#Checker.__init__">Checker</a></td> |
|
199 <td>Constructor</td> |
|
200 </tr><tr> |
|
201 <td><a href="#Checker.ASSIGN">ASSIGN</a></td> |
|
202 <td></td> |
|
203 </tr><tr> |
|
204 <td><a href="#Checker.AUGASSIGN">AUGASSIGN</a></td> |
|
205 <td></td> |
|
206 </tr><tr> |
|
207 <td><a href="#Checker.CLASSDEF">CLASSDEF</a></td> |
|
208 <td>Check names used in a class definition, including its decorators, base classes, and the body of its definition.</td> |
|
209 </tr><tr> |
|
210 <td><a href="#Checker.DICTCOMP">DICTCOMP</a></td> |
|
211 <td></td> |
|
212 </tr><tr> |
|
213 <td><a href="#Checker.FOR">FOR</a></td> |
|
214 <td>Process bindings for loop variables.</td> |
|
215 </tr><tr> |
|
216 <td><a href="#Checker.FUNCTIONDEF">FUNCTIONDEF</a></td> |
|
217 <td></td> |
|
218 </tr><tr> |
|
219 <td><a href="#Checker.GLOBAL">GLOBAL</a></td> |
|
220 <td>Keep track of globals declarations.</td> |
|
221 </tr><tr> |
|
222 <td><a href="#Checker.IMPORT">IMPORT</a></td> |
|
223 <td></td> |
|
224 </tr><tr> |
|
225 <td><a href="#Checker.IMPORTFROM">IMPORTFROM</a></td> |
|
226 <td></td> |
|
227 </tr><tr> |
|
228 <td><a href="#Checker.LAMBDA">LAMBDA</a></td> |
|
229 <td></td> |
|
230 </tr><tr> |
|
231 <td><a href="#Checker.LISTCOMP">LISTCOMP</a></td> |
|
232 <td></td> |
|
233 </tr><tr> |
|
234 <td><a href="#Checker.NAME">NAME</a></td> |
|
235 <td>Locate the name in locals / function / globals scopes.</td> |
|
236 </tr><tr> |
|
237 <td><a href="#Checker._runDeferred">_runDeferred</a></td> |
|
238 <td>Run the callables in deferred using their associated scope stack.</td> |
|
239 </tr><tr> |
|
240 <td><a href="#Checker.addArgs">addArgs</a></td> |
|
241 <td></td> |
|
242 </tr><tr> |
|
243 <td><a href="#Checker.addBinding">addBinding</a></td> |
|
244 <td>Called when a binding is altered.</td> |
|
245 </tr><tr> |
|
246 <td><a href="#Checker.checkUnusedAssignments">checkUnusedAssignments</a></td> |
|
247 <td>Check to see if any assignments have not been used.</td> |
|
248 </tr><tr> |
|
249 <td><a href="#Checker.check_dead_scopes">check_dead_scopes</a></td> |
|
250 <td>Look at scopes which have been fully examined and report names in them which were imported but unused.</td> |
|
251 </tr><tr> |
|
252 <td><a href="#Checker.collectLoopVars">collectLoopVars</a></td> |
|
253 <td></td> |
|
254 </tr><tr> |
|
255 <td><a href="#Checker.deferAssignment">deferAssignment</a></td> |
|
256 <td>Schedule an assignment handler to be called just after deferred function handlers.</td> |
|
257 </tr><tr> |
|
258 <td><a href="#Checker.deferFunction">deferFunction</a></td> |
|
259 <td>Schedule a function handler to be called just before completion.</td> |
|
260 </tr><tr> |
|
261 <td><a href="#Checker.handleChildren">handleChildren</a></td> |
|
262 <td></td> |
|
263 </tr><tr> |
|
264 <td><a href="#Checker.handleNode">handleNode</a></td> |
|
265 <td></td> |
|
266 </tr><tr> |
|
267 <td><a href="#Checker.ignore">ignore</a></td> |
|
268 <td></td> |
|
269 </tr><tr> |
|
270 <td><a href="#Checker.isDocstring">isDocstring</a></td> |
|
271 <td>Determine if the given node is a docstring, as long as it is at the correct place in the node tree.</td> |
|
272 </tr><tr> |
|
273 <td><a href="#Checker.popScope">popScope</a></td> |
|
274 <td></td> |
|
275 </tr><tr> |
|
276 <td><a href="#Checker.pushClassScope">pushClassScope</a></td> |
|
277 <td></td> |
|
278 </tr><tr> |
|
279 <td><a href="#Checker.pushFunctionScope">pushFunctionScope</a></td> |
|
280 <td></td> |
|
281 </tr><tr> |
|
282 <td><a href="#Checker.report">report</a></td> |
|
283 <td></td> |
|
284 </tr><tr> |
|
285 <td><a href="#Checker.runFunction">runFunction</a></td> |
|
286 <td></td> |
|
287 </tr><tr> |
|
288 <td><a href="#Checker.scope">scope</a></td> |
|
289 <td></td> |
|
290 </tr> |
|
291 </table> |
|
292 <h3>Static Methods</h3> |
|
293 <table> |
|
294 <tr><td>None</td></tr> |
|
295 </table> |
|
296 <a NAME="Checker.__init__" ID="Checker.__init__"></a> |
|
297 <h4>Checker (Constructor)</h4> |
|
298 <b>Checker</b>(<i>module, filename='(none)'</i>) |
|
299 <p> |
|
300 Constructor |
|
301 </p><dl> |
|
302 <dt><i>module</i></dt> |
|
303 <dd> |
|
304 parsed module tree or module source code |
|
305 </dd><dt><i>filename</i></dt> |
|
306 <dd> |
|
307 name of the module file (string) |
|
308 </dd> |
|
309 </dl><a NAME="Checker.ASSIGN" ID="Checker.ASSIGN"></a> |
|
310 <h4>Checker.ASSIGN</h4> |
|
311 <b>ASSIGN</b>(<i>node</i>) |
|
312 <a NAME="Checker.AUGASSIGN" ID="Checker.AUGASSIGN"></a> |
|
313 <h4>Checker.AUGASSIGN</h4> |
|
314 <b>AUGASSIGN</b>(<i>node</i>) |
|
315 <a NAME="Checker.CLASSDEF" ID="Checker.CLASSDEF"></a> |
|
316 <h4>Checker.CLASSDEF</h4> |
|
317 <b>CLASSDEF</b>(<i>node</i>) |
|
318 <p> |
|
319 Check names used in a class definition, including its decorators, base |
|
320 classes, and the body of its definition. Additionally, add its name to |
|
321 the current scope. |
|
322 </p><a NAME="Checker.DICTCOMP" ID="Checker.DICTCOMP"></a> |
|
323 <h4>Checker.DICTCOMP</h4> |
|
324 <b>DICTCOMP</b>(<i>node</i>) |
|
325 <a NAME="Checker.FOR" ID="Checker.FOR"></a> |
|
326 <h4>Checker.FOR</h4> |
|
327 <b>FOR</b>(<i>node</i>) |
|
328 <p> |
|
329 Process bindings for loop variables. |
|
330 </p><a NAME="Checker.FUNCTIONDEF" ID="Checker.FUNCTIONDEF"></a> |
|
331 <h4>Checker.FUNCTIONDEF</h4> |
|
332 <b>FUNCTIONDEF</b>(<i>node</i>) |
|
333 <a NAME="Checker.GLOBAL" ID="Checker.GLOBAL"></a> |
|
334 <h4>Checker.GLOBAL</h4> |
|
335 <b>GLOBAL</b>(<i>node</i>) |
|
336 <p> |
|
337 Keep track of globals declarations. |
|
338 </p><a NAME="Checker.IMPORT" ID="Checker.IMPORT"></a> |
|
339 <h4>Checker.IMPORT</h4> |
|
340 <b>IMPORT</b>(<i>node</i>) |
|
341 <a NAME="Checker.IMPORTFROM" ID="Checker.IMPORTFROM"></a> |
|
342 <h4>Checker.IMPORTFROM</h4> |
|
343 <b>IMPORTFROM</b>(<i>node</i>) |
|
344 <a NAME="Checker.LAMBDA" ID="Checker.LAMBDA"></a> |
|
345 <h4>Checker.LAMBDA</h4> |
|
346 <b>LAMBDA</b>(<i>node</i>) |
|
347 <a NAME="Checker.LISTCOMP" ID="Checker.LISTCOMP"></a> |
|
348 <h4>Checker.LISTCOMP</h4> |
|
349 <b>LISTCOMP</b>(<i>node</i>) |
|
350 <a NAME="Checker.NAME" ID="Checker.NAME"></a> |
|
351 <h4>Checker.NAME</h4> |
|
352 <b>NAME</b>(<i>node</i>) |
|
353 <p> |
|
354 Locate the name in locals / function / globals scopes. |
|
355 </p><a NAME="Checker._runDeferred" ID="Checker._runDeferred"></a> |
|
356 <h4>Checker._runDeferred</h4> |
|
357 <b>_runDeferred</b>(<i>deferred</i>) |
|
358 <p> |
|
359 Run the callables in deferred using their associated scope stack. |
|
360 </p><a NAME="Checker.addArgs" ID="Checker.addArgs"></a> |
|
361 <h4>Checker.addArgs</h4> |
|
362 <b>addArgs</b>(<i></i>) |
|
363 <a NAME="Checker.addBinding" ID="Checker.addBinding"></a> |
|
364 <h4>Checker.addBinding</h4> |
|
365 <b>addBinding</b>(<i>lineno, value, reportRedef=True</i>) |
|
366 <p> |
|
367 Called when a binding is altered. |
|
368 </p><dl> |
|
369 <dt><i>lineno</i></dt> |
|
370 <dd> |
|
371 line of the statement responsible for the change |
|
372 (integer) |
|
373 </dd><dt><i>value</i></dt> |
|
374 <dd> |
|
375 the optional new value, a Binding instance, associated |
|
376 with the binding; if None, the binding is deleted if it exists |
|
377 </dd><dt><i>reportRedef</i></dt> |
|
378 <dd> |
|
379 flag indicating if rebinding while unused will be |
|
380 reported (boolean) |
|
381 </dd> |
|
382 </dl><a NAME="Checker.checkUnusedAssignments" ID="Checker.checkUnusedAssignments"></a> |
|
383 <h4>Checker.checkUnusedAssignments</h4> |
|
384 <b>checkUnusedAssignments</b>(<i></i>) |
|
385 <p> |
|
386 Check to see if any assignments have not been used. |
|
387 </p><a NAME="Checker.check_dead_scopes" ID="Checker.check_dead_scopes"></a> |
|
388 <h4>Checker.check_dead_scopes</h4> |
|
389 <b>check_dead_scopes</b>(<i></i>) |
|
390 <p> |
|
391 Look at scopes which have been fully examined and report names in them |
|
392 which were imported but unused. |
|
393 </p><a NAME="Checker.collectLoopVars" ID="Checker.collectLoopVars"></a> |
|
394 <h4>Checker.collectLoopVars</h4> |
|
395 <b>collectLoopVars</b>(<i></i>) |
|
396 <a NAME="Checker.deferAssignment" ID="Checker.deferAssignment"></a> |
|
397 <h4>Checker.deferAssignment</h4> |
|
398 <b>deferAssignment</b>(<i>callable</i>) |
|
399 <p> |
|
400 Schedule an assignment handler to be called just after deferred |
|
401 function handlers. |
|
402 </p><a NAME="Checker.deferFunction" ID="Checker.deferFunction"></a> |
|
403 <h4>Checker.deferFunction</h4> |
|
404 <b>deferFunction</b>(<i>callable</i>) |
|
405 <p> |
|
406 Schedule a function handler to be called just before completion. |
|
407 </p><p> |
|
408 This is used for handling function bodies, which must be deferred |
|
409 because code later in the file might modify the global scope. When |
|
410 `callable` is called, the scope at the time this is called will be |
|
411 restored, however it will contain any new bindings added to it. |
|
412 </p><a NAME="Checker.handleChildren" ID="Checker.handleChildren"></a> |
|
413 <h4>Checker.handleChildren</h4> |
|
414 <b>handleChildren</b>(<i>tree</i>) |
|
415 <a NAME="Checker.handleNode" ID="Checker.handleNode"></a> |
|
416 <h4>Checker.handleNode</h4> |
|
417 <b>handleNode</b>(<i>node, parent</i>) |
|
418 <a NAME="Checker.ignore" ID="Checker.ignore"></a> |
|
419 <h4>Checker.ignore</h4> |
|
420 <b>ignore</b>(<i>node</i>) |
|
421 <a NAME="Checker.isDocstring" ID="Checker.isDocstring"></a> |
|
422 <h4>Checker.isDocstring</h4> |
|
423 <b>isDocstring</b>(<i>node</i>) |
|
424 <p> |
|
425 Determine if the given node is a docstring, as long as it is at the |
|
426 correct place in the node tree. |
|
427 </p><a NAME="Checker.popScope" ID="Checker.popScope"></a> |
|
428 <h4>Checker.popScope</h4> |
|
429 <b>popScope</b>(<i></i>) |
|
430 <a NAME="Checker.pushClassScope" ID="Checker.pushClassScope"></a> |
|
431 <h4>Checker.pushClassScope</h4> |
|
432 <b>pushClassScope</b>(<i></i>) |
|
433 <a NAME="Checker.pushFunctionScope" ID="Checker.pushFunctionScope"></a> |
|
434 <h4>Checker.pushFunctionScope</h4> |
|
435 <b>pushFunctionScope</b>(<i></i>) |
|
436 <a NAME="Checker.report" ID="Checker.report"></a> |
|
437 <h4>Checker.report</h4> |
|
438 <b>report</b>(<i>messageClass, *args, **kwargs</i>) |
|
439 <a NAME="Checker.runFunction" ID="Checker.runFunction"></a> |
|
440 <h4>Checker.runFunction</h4> |
|
441 <b>runFunction</b>(<i></i>) |
|
442 <a NAME="Checker.scope" ID="Checker.scope"></a> |
|
443 <h4>Checker.scope</h4> |
|
444 <b>scope</b>(<i></i>) |
|
445 |
|
446 <div align="right"><a href="#top">Up</a></div> |
|
447 <hr /><hr /> |
|
448 <a NAME="ClassScope" ID="ClassScope"></a> |
|
449 <h2>ClassScope</h2> |
|
450 <p> |
|
451 Class representing a name scope for a class. |
|
452 </p> |
|
453 <h3>Derived from</h3> |
|
454 Scope |
|
455 <h3>Class Attributes</h3> |
|
456 <table> |
|
457 <tr><td>None</td></tr> |
|
458 </table> |
|
459 <h3>Class Methods</h3> |
|
460 <table> |
|
461 <tr><td>None</td></tr> |
|
462 </table> |
|
463 <h3>Methods</h3> |
|
464 <table> |
|
465 <tr><td>None</td></tr> |
|
466 </table> |
|
467 <h3>Static Methods</h3> |
|
468 <table> |
|
469 <tr><td>None</td></tr> |
|
470 </table> |
|
471 |
|
472 <div align="right"><a href="#top">Up</a></div> |
|
473 <hr /><hr /> |
|
474 <a NAME="ExportBinding" ID="ExportBinding"></a> |
|
475 <h2>ExportBinding</h2> |
|
476 <p> |
|
477 A binding created by an __all__ assignment. If the names in the list |
|
478 can be determined statically, they will be treated as names for export and |
|
479 additional checking applied to them. |
|
480 </p><p> |
|
481 The only __all__ assignment that can be recognized is one which takes |
|
482 the value of a literal list containing literal strings. For example:: |
|
483 </p><p> |
|
484 __all__ = ["foo", "bar"] |
|
485 </p><p> |
|
486 Names which are imported and not otherwise used but appear in the value of |
|
487 __all__ will not have an unused import warning reported for them. |
|
488 </p> |
|
489 <h3>Derived from</h3> |
|
490 Binding |
|
491 <h3>Class Attributes</h3> |
|
492 <table> |
|
493 <tr><td>None</td></tr> |
|
494 </table> |
|
495 <h3>Class Methods</h3> |
|
496 <table> |
|
497 <tr><td>None</td></tr> |
|
498 </table> |
|
499 <h3>Methods</h3> |
|
500 <table> |
|
501 <tr> |
|
502 <td><a href="#ExportBinding.names">names</a></td> |
|
503 <td>Return a list of the names referenced by this binding.</td> |
|
504 </tr> |
|
505 </table> |
|
506 <h3>Static Methods</h3> |
|
507 <table> |
|
508 <tr><td>None</td></tr> |
|
509 </table> |
|
510 <a NAME="ExportBinding.names" ID="ExportBinding.names"></a> |
|
511 <h4>ExportBinding.names</h4> |
|
512 <b>names</b>(<i></i>) |
|
513 <p> |
|
514 Return a list of the names referenced by this binding. |
|
515 </p> |
|
516 <div align="right"><a href="#top">Up</a></div> |
|
517 <hr /><hr /> |
|
518 <a NAME="FunctionDefinition" ID="FunctionDefinition"></a> |
|
519 <h2>FunctionDefinition</h2> |
|
520 <p> |
|
521 Represents a function definition. |
|
522 </p> |
|
523 <h3>Derived from</h3> |
|
524 Binding |
|
525 <h3>Class Attributes</h3> |
|
526 <table> |
|
527 <tr><td>None</td></tr> |
|
528 </table> |
|
529 <h3>Class Methods</h3> |
|
530 <table> |
|
531 <tr><td>None</td></tr> |
|
532 </table> |
|
533 <h3>Methods</h3> |
|
534 <table> |
|
535 <tr><td>None</td></tr> |
|
536 </table> |
|
537 <h3>Static Methods</h3> |
|
538 <table> |
|
539 <tr><td>None</td></tr> |
|
540 </table> |
|
541 |
|
542 <div align="right"><a href="#top">Up</a></div> |
|
543 <hr /><hr /> |
|
544 <a NAME="FunctionScope" ID="FunctionScope"></a> |
|
545 <h2>FunctionScope</h2> |
|
546 <p> |
|
547 Class representing a name scope for a function. |
|
548 </p> |
|
549 <h3>Derived from</h3> |
|
550 Scope |
|
551 <h3>Class Attributes</h3> |
|
552 <table> |
|
553 <tr><td>None</td></tr> |
|
554 </table> |
|
555 <h3>Class Methods</h3> |
|
556 <table> |
|
557 <tr><td>None</td></tr> |
|
558 </table> |
|
559 <h3>Methods</h3> |
|
560 <table> |
|
561 <tr> |
|
562 <td><a href="#FunctionScope.__init__">FunctionScope</a></td> |
|
563 <td></td> |
|
564 </tr> |
|
565 </table> |
|
566 <h3>Static Methods</h3> |
|
567 <table> |
|
568 <tr><td>None</td></tr> |
|
569 </table> |
|
570 <a NAME="FunctionScope.__init__" ID="FunctionScope.__init__"></a> |
|
571 <h4>FunctionScope (Constructor)</h4> |
|
572 <b>FunctionScope</b>(<i></i>) |
|
573 |
|
574 <div align="right"><a href="#top">Up</a></div> |
|
575 <hr /><hr /> |
|
576 <a NAME="Importation" ID="Importation"></a> |
|
577 <h2>Importation</h2> |
|
578 <p> |
|
579 A binding created by an import statement. |
|
580 </p> |
|
581 <h3>Derived from</h3> |
|
582 Binding |
|
583 <h3>Class Attributes</h3> |
|
584 <table> |
|
585 <tr><td>None</td></tr> |
|
586 </table> |
|
587 <h3>Class Methods</h3> |
|
588 <table> |
|
589 <tr><td>None</td></tr> |
|
590 </table> |
|
591 <h3>Methods</h3> |
|
592 <table> |
|
593 <tr> |
|
594 <td><a href="#Importation.__init__">Importation</a></td> |
|
595 <td></td> |
|
596 </tr> |
|
597 </table> |
|
598 <h3>Static Methods</h3> |
|
599 <table> |
|
600 <tr><td>None</td></tr> |
|
601 </table> |
|
602 <a NAME="Importation.__init__" ID="Importation.__init__"></a> |
|
603 <h4>Importation (Constructor)</h4> |
|
604 <b>Importation</b>(<i>name, source</i>) |
|
605 |
|
606 <div align="right"><a href="#top">Up</a></div> |
|
607 <hr /><hr /> |
|
608 <a NAME="ModuleScope" ID="ModuleScope"></a> |
|
609 <h2>ModuleScope</h2> |
|
610 <p> |
|
611 Class representing a name scope for a module. |
|
612 </p> |
|
613 <h3>Derived from</h3> |
|
614 Scope |
|
615 <h3>Class Attributes</h3> |
|
616 <table> |
|
617 <tr><td>None</td></tr> |
|
618 </table> |
|
619 <h3>Class Methods</h3> |
|
620 <table> |
|
621 <tr><td>None</td></tr> |
|
622 </table> |
|
623 <h3>Methods</h3> |
|
624 <table> |
|
625 <tr><td>None</td></tr> |
|
626 </table> |
|
627 <h3>Static Methods</h3> |
|
628 <table> |
|
629 <tr><td>None</td></tr> |
|
630 </table> |
|
631 |
|
632 <div align="right"><a href="#top">Up</a></div> |
|
633 <hr /><hr /> |
|
634 <a NAME="Scope" ID="Scope"></a> |
|
635 <h2>Scope</h2> |
|
636 <p> |
|
637 Class defining the scope base class. |
|
638 </p> |
|
639 <h3>Derived from</h3> |
|
640 dict |
|
641 <h3>Class Attributes</h3> |
|
642 <table> |
|
643 <tr><td>importStarred</td></tr> |
|
644 </table> |
|
645 <h3>Class Methods</h3> |
|
646 <table> |
|
647 <tr><td>None</td></tr> |
|
648 </table> |
|
649 <h3>Methods</h3> |
|
650 <table> |
|
651 <tr> |
|
652 <td><a href="#Scope.__init__">Scope</a></td> |
|
653 <td></td> |
|
654 </tr><tr> |
|
655 <td><a href="#Scope.__repr__">__repr__</a></td> |
|
656 <td></td> |
|
657 </tr> |
|
658 </table> |
|
659 <h3>Static Methods</h3> |
|
660 <table> |
|
661 <tr><td>None</td></tr> |
|
662 </table> |
|
663 <a NAME="Scope.__init__" ID="Scope.__init__"></a> |
|
664 <h4>Scope (Constructor)</h4> |
|
665 <b>Scope</b>(<i></i>) |
|
666 <a NAME="Scope.__repr__" ID="Scope.__repr__"></a> |
|
667 <h4>Scope.__repr__</h4> |
|
668 <b>__repr__</b>(<i></i>) |
|
669 |
|
670 <div align="right"><a href="#top">Up</a></div> |
|
671 <hr /><hr /> |
|
672 <a NAME="UnBinding" ID="UnBinding"></a> |
|
673 <h2>UnBinding</h2> |
|
674 <p> |
|
675 Created by the 'del' operator. |
|
676 </p> |
|
677 <h3>Derived from</h3> |
|
678 Binding |
|
679 <h3>Class Attributes</h3> |
|
680 <table> |
|
681 <tr><td>None</td></tr> |
|
682 </table> |
|
683 <h3>Class Methods</h3> |
|
684 <table> |
|
685 <tr><td>None</td></tr> |
|
686 </table> |
|
687 <h3>Methods</h3> |
|
688 <table> |
|
689 <tr><td>None</td></tr> |
|
690 </table> |
|
691 <h3>Static Methods</h3> |
|
692 <table> |
|
693 <tr><td>None</td></tr> |
|
694 </table> |
|
695 |
|
696 <div align="right"><a href="#top">Up</a></div> |
|
697 <hr /><hr /> |
|
698 <a NAME="iter_child_nodes" ID="iter_child_nodes"></a> |
|
699 <h2>iter_child_nodes</h2> |
|
700 <b>iter_child_nodes</b>(<i>node, astcls=_ast.AST</i>) |
|
701 <p> |
|
702 Yield all direct child nodes of *node*, that is, all fields that are |
|
703 nodes and all items of fields that are lists of nodes. |
|
704 </p> |
|
705 <div align="right"><a href="#top">Up</a></div> |
|
706 <hr /> |
|
707 </body></html> |
|