29 <tr> |
29 <tr> |
30 <td><a href="#getValue">getValue</a></td> |
30 <td><a href="#getValue">getValue</a></td> |
31 <td>Function to extract the value of a node.</td> |
31 <td>Function to extract the value of a node.</td> |
32 </tr> |
32 </tr> |
33 <tr> |
33 <tr> |
34 <td><a href="#getValue_1">getValue</a></td> |
|
35 <td>Function to extract the value of a node.</td> |
|
36 </tr> |
|
37 <tr> |
|
38 <td><a href="#isBaseString">isBaseString</a></td> |
34 <td><a href="#isBaseString">isBaseString</a></td> |
39 <td>Function to check that a node is a bytes or string.</td> |
35 <td>Function to check that a node is a bytes or string.</td> |
40 </tr> |
36 </tr> |
41 <tr> |
37 <tr> |
42 <td><a href="#isBaseString_1">isBaseString</a></td> |
|
43 <td>Function to check that a node is a bytes or string.</td> |
|
44 </tr> |
|
45 <tr> |
|
46 <td><a href="#isBytes">isBytes</a></td> |
38 <td><a href="#isBytes">isBytes</a></td> |
47 <td>Function to check that a node is a bytes.</td> |
39 <td>Function to check that a node is a bytes.</td> |
48 </tr> |
40 </tr> |
49 <tr> |
41 <tr> |
50 <td><a href="#isBytes_1">isBytes</a></td> |
|
51 <td>Function to check that a node is a bytes.</td> |
|
52 </tr> |
|
53 <tr> |
|
54 <td><a href="#isEllipsis">isEllipsis</a></td> |
42 <td><a href="#isEllipsis">isEllipsis</a></td> |
55 <td>Function to check that a node is an ellipsis.</td> |
43 <td>Function to check that a node is an ellipsis.</td> |
56 </tr> |
44 </tr> |
57 <tr> |
45 <tr> |
58 <td><a href="#isEllipsis_1">isEllipsis</a></td> |
|
59 <td>Function to check that a node is an ellipsis.</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#isNameConstant">isNameConstant</a></td> |
46 <td><a href="#isNameConstant">isNameConstant</a></td> |
63 <td>Function to check that a node is a name constant.</td> |
47 <td>Function to check that a node is a name constant.</td> |
64 </tr> |
48 </tr> |
65 <tr> |
49 <tr> |
66 <td><a href="#isNameConstant_1">isNameConstant</a></td> |
|
67 <td>Function to check that a node is a name constant.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#isNumber">isNumber</a></td> |
50 <td><a href="#isNumber">isNumber</a></td> |
71 <td>Function to check that a node is a number.</td> |
51 <td>Function to check that a node is a number.</td> |
72 </tr> |
52 </tr> |
73 <tr> |
53 <tr> |
74 <td><a href="#isNumber_1">isNumber</a></td> |
|
75 <td>Function to check that a node is a number.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#isString">isString</a></td> |
54 <td><a href="#isString">isString</a></td> |
79 <td>Function to check that a node is a string.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#isString_1">isString</a></td> |
|
83 <td>Function to check that a node is a string.</td> |
55 <td>Function to check that a node is a string.</td> |
84 </tr> |
56 </tr> |
85 </table> |
57 </table> |
86 <hr /> |
58 <hr /> |
87 <hr /> |
59 <hr /> |
88 <a NAME="getValue" ID="getValue"></a> |
60 <a NAME="getValue" ID="getValue"></a> |
89 <h2>getValue</h2> |
61 <h2>getValue</h2> |
90 <b>getValue</b>(<i>node</i>) |
62 <b>getValue</b>(<i>node</i>) |
91 |
63 |
92 <p> |
64 <p> |
93 Function to extract the value of a node. |
65 Function to extract the value of a node. |
94 </p> |
66 </p> |
95 <dl> |
67 <dl> |
96 |
68 |
97 <dt><i>node</i> (ast.Constant)</dt> |
69 <dt><i>node</i> (ast.Constant)</dt> |
98 <dd> |
70 <dd> |
107 </dl> |
79 </dl> |
108 <dl> |
80 <dl> |
109 <dt>Return Type:</dt> |
81 <dt>Return Type:</dt> |
110 <dd> |
82 <dd> |
111 any |
83 any |
112 </dd> |
|
113 </dl> |
|
114 <dl> |
|
115 |
|
116 <dt>Raises <b>TypeError</b>:</dt> |
|
117 <dd> |
|
118 raised to indicate an unsupported type |
|
119 </dd> |
|
120 </dl> |
|
121 <div align="right"><a href="#top">Up</a></div> |
|
122 <hr /> |
|
123 <hr /> |
|
124 <a NAME="getValue_1" ID="getValue_1"></a> |
|
125 <h2>getValue</h2> |
|
126 <b>getValue</b>(<i>node</i>) |
|
127 |
|
128 <p> |
|
129 Function to extract the value of a node. |
|
130 </p> |
|
131 <dl> |
|
132 |
|
133 <dt><i>node</i> (one of ast.Num, ast.Str, ast.Bytes or ast.NameConstant)</dt> |
|
134 <dd> |
|
135 reference to the node to extract the value from |
|
136 </dd> |
|
137 </dl> |
|
138 <dl> |
|
139 <dt>Return:</dt> |
|
140 <dd> |
|
141 value of the node |
|
142 </dd> |
|
143 </dl> |
|
144 <dl> |
|
145 <dt>Return Type:</dt> |
|
146 <dd> |
|
147 one of str, bytes, int |
|
148 </dd> |
84 </dd> |
149 </dl> |
85 </dl> |
150 <dl> |
86 <dl> |
151 |
87 |
152 <dt>Raises <b>TypeError</b>:</dt> |
88 <dt>Raises <b>TypeError</b>:</dt> |
160 <a NAME="isBaseString" ID="isBaseString"></a> |
96 <a NAME="isBaseString" ID="isBaseString"></a> |
161 <h2>isBaseString</h2> |
97 <h2>isBaseString</h2> |
162 <b>isBaseString</b>(<i>node</i>) |
98 <b>isBaseString</b>(<i>node</i>) |
163 |
99 |
164 <p> |
100 <p> |
165 Function to check that a node is a bytes or string. |
101 Function to check that a node is a bytes or string. |
166 </p> |
|
167 <dl> |
|
168 |
|
169 <dt><i>node</i> (ast.AST)</dt> |
|
170 <dd> |
|
171 reference to the node to check |
|
172 </dd> |
|
173 </dl> |
|
174 <dl> |
|
175 <dt>Return:</dt> |
|
176 <dd> |
|
177 flag indicating a bytes or string |
|
178 </dd> |
|
179 </dl> |
|
180 <dl> |
|
181 <dt>Return Type:</dt> |
|
182 <dd> |
|
183 bool |
|
184 </dd> |
|
185 </dl> |
|
186 <div align="right"><a href="#top">Up</a></div> |
|
187 <hr /> |
|
188 <hr /> |
|
189 <a NAME="isBaseString_1" ID="isBaseString_1"></a> |
|
190 <h2>isBaseString</h2> |
|
191 <b>isBaseString</b>(<i>node</i>) |
|
192 |
|
193 <p> |
|
194 Function to check that a node is a bytes or string. |
|
195 </p> |
102 </p> |
196 <dl> |
103 <dl> |
197 |
104 |
198 <dt><i>node</i> (ast.AST)</dt> |
105 <dt><i>node</i> (ast.AST)</dt> |
199 <dd> |
106 <dd> |
218 <a NAME="isBytes" ID="isBytes"></a> |
125 <a NAME="isBytes" ID="isBytes"></a> |
219 <h2>isBytes</h2> |
126 <h2>isBytes</h2> |
220 <b>isBytes</b>(<i>node</i>) |
127 <b>isBytes</b>(<i>node</i>) |
221 |
128 |
222 <p> |
129 <p> |
223 Function to check that a node is a bytes. |
130 Function to check that a node is a bytes. |
224 </p> |
|
225 <dl> |
|
226 |
|
227 <dt><i>node</i> (ast.AST)</dt> |
|
228 <dd> |
|
229 reference to the node to check |
|
230 </dd> |
|
231 </dl> |
|
232 <dl> |
|
233 <dt>Return:</dt> |
|
234 <dd> |
|
235 flag indicating a bytes |
|
236 </dd> |
|
237 </dl> |
|
238 <dl> |
|
239 <dt>Return Type:</dt> |
|
240 <dd> |
|
241 bool |
|
242 </dd> |
|
243 </dl> |
|
244 <div align="right"><a href="#top">Up</a></div> |
|
245 <hr /> |
|
246 <hr /> |
|
247 <a NAME="isBytes_1" ID="isBytes_1"></a> |
|
248 <h2>isBytes</h2> |
|
249 <b>isBytes</b>(<i>node</i>) |
|
250 |
|
251 <p> |
|
252 Function to check that a node is a bytes. |
|
253 </p> |
131 </p> |
254 <dl> |
132 <dl> |
255 |
133 |
256 <dt><i>node</i> (ast.AST)</dt> |
134 <dt><i>node</i> (ast.AST)</dt> |
257 <dd> |
135 <dd> |
276 <a NAME="isEllipsis" ID="isEllipsis"></a> |
154 <a NAME="isEllipsis" ID="isEllipsis"></a> |
277 <h2>isEllipsis</h2> |
155 <h2>isEllipsis</h2> |
278 <b>isEllipsis</b>(<i>node</i>) |
156 <b>isEllipsis</b>(<i>node</i>) |
279 |
157 |
280 <p> |
158 <p> |
281 Function to check that a node is an ellipsis. |
159 Function to check that a node is an ellipsis. |
282 </p> |
|
283 <dl> |
|
284 |
|
285 <dt><i>node</i> (ast.AST)</dt> |
|
286 <dd> |
|
287 reference to the node to check |
|
288 </dd> |
|
289 </dl> |
|
290 <dl> |
|
291 <dt>Return:</dt> |
|
292 <dd> |
|
293 flag indicating an ellipsis |
|
294 </dd> |
|
295 </dl> |
|
296 <dl> |
|
297 <dt>Return Type:</dt> |
|
298 <dd> |
|
299 bool |
|
300 </dd> |
|
301 </dl> |
|
302 <div align="right"><a href="#top">Up</a></div> |
|
303 <hr /> |
|
304 <hr /> |
|
305 <a NAME="isEllipsis_1" ID="isEllipsis_1"></a> |
|
306 <h2>isEllipsis</h2> |
|
307 <b>isEllipsis</b>(<i>node</i>) |
|
308 |
|
309 <p> |
|
310 Function to check that a node is an ellipsis. |
|
311 </p> |
160 </p> |
312 <dl> |
161 <dl> |
313 |
162 |
314 <dt><i>node</i> (ast.AST)</dt> |
163 <dt><i>node</i> (ast.AST)</dt> |
315 <dd> |
164 <dd> |
334 <a NAME="isNameConstant" ID="isNameConstant"></a> |
183 <a NAME="isNameConstant" ID="isNameConstant"></a> |
335 <h2>isNameConstant</h2> |
184 <h2>isNameConstant</h2> |
336 <b>isNameConstant</b>(<i>node</i>) |
185 <b>isNameConstant</b>(<i>node</i>) |
337 |
186 |
338 <p> |
187 <p> |
339 Function to check that a node is a name constant. |
188 Function to check that a node is a name constant. |
340 </p> |
|
341 <dl> |
|
342 |
|
343 <dt><i>node</i> (ast.AST)</dt> |
|
344 <dd> |
|
345 reference to the node to check |
|
346 </dd> |
|
347 </dl> |
|
348 <dl> |
|
349 <dt>Return:</dt> |
|
350 <dd> |
|
351 flag indicating a name constant |
|
352 </dd> |
|
353 </dl> |
|
354 <dl> |
|
355 <dt>Return Type:</dt> |
|
356 <dd> |
|
357 bool |
|
358 </dd> |
|
359 </dl> |
|
360 <div align="right"><a href="#top">Up</a></div> |
|
361 <hr /> |
|
362 <hr /> |
|
363 <a NAME="isNameConstant_1" ID="isNameConstant_1"></a> |
|
364 <h2>isNameConstant</h2> |
|
365 <b>isNameConstant</b>(<i>node</i>) |
|
366 |
|
367 <p> |
|
368 Function to check that a node is a name constant. |
|
369 </p> |
189 </p> |
370 <dl> |
190 <dl> |
371 |
191 |
372 <dt><i>node</i> (ast.AST)</dt> |
192 <dt><i>node</i> (ast.AST)</dt> |
373 <dd> |
193 <dd> |
392 <a NAME="isNumber" ID="isNumber"></a> |
212 <a NAME="isNumber" ID="isNumber"></a> |
393 <h2>isNumber</h2> |
213 <h2>isNumber</h2> |
394 <b>isNumber</b>(<i>node</i>) |
214 <b>isNumber</b>(<i>node</i>) |
395 |
215 |
396 <p> |
216 <p> |
397 Function to check that a node is a number. |
217 Function to check that a node is a number. |
398 </p> |
|
399 <dl> |
|
400 |
|
401 <dt><i>node</i> (ast.AST)</dt> |
|
402 <dd> |
|
403 reference to the node to check |
|
404 </dd> |
|
405 </dl> |
|
406 <dl> |
|
407 <dt>Return:</dt> |
|
408 <dd> |
|
409 flag indicating a number |
|
410 </dd> |
|
411 </dl> |
|
412 <dl> |
|
413 <dt>Return Type:</dt> |
|
414 <dd> |
|
415 bool |
|
416 </dd> |
|
417 </dl> |
|
418 <div align="right"><a href="#top">Up</a></div> |
|
419 <hr /> |
|
420 <hr /> |
|
421 <a NAME="isNumber_1" ID="isNumber_1"></a> |
|
422 <h2>isNumber</h2> |
|
423 <b>isNumber</b>(<i>node</i>) |
|
424 |
|
425 <p> |
|
426 Function to check that a node is a number. |
|
427 </p> |
218 </p> |
428 <dl> |
219 <dl> |
429 |
220 |
430 <dt><i>node</i> (ast.AST)</dt> |
221 <dt><i>node</i> (ast.AST)</dt> |
431 <dd> |
222 <dd> |