1[
2 {"type":"CommentHashbang","value":"#! /usr/bin/env python"},
3 {"type":"Text","value":"\n"},
4 {"type":"CommentSingle","value":"# From CPython (Lib/base64.py)"},
5 {"type":"Text","value":"\n\n"},
6 {"type":"LiteralStringDouble","value":"\"\"\"RFC 3548: Base16, Base32, Base64 Data Encodings\"\"\""},
7 {"type":"Text","value":"\n\n"},
8 {"type":"CommentSingle","value":"# Modified 04-Oct-1995 by Jack Jansen to use binascii module"},
9 {"type":"Text","value":"\n"},
10 {"type":"CommentSingle","value":"# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support"},
11 {"type":"Text","value":"\n\n"},
12 {"type":"KeywordNamespace","value":"import"},
13 {"type":"Text","value":" "},
14 {"type":"NameNamespace","value":"re"},
15 {"type":"Text","value":"\n"},
16 {"type":"KeywordNamespace","value":"import"},
17 {"type":"Text","value":" "},
18 {"type":"NameNamespace","value":"struct"},
19 {"type":"Text","value":"\n"},
20 {"type":"KeywordNamespace","value":"import"},
21 {"type":"Text","value":" "},
22 {"type":"NameNamespace","value":"string"},
23 {"type":"Text","value":"\n"},
24 {"type":"KeywordNamespace","value":"import"},
25 {"type":"Text","value":" "},
26 {"type":"NameNamespace","value":"binascii"},
27 {"type":"Text","value":"\n\n\n"},
28 {"type":"Name","value":"__all__"},
29 {"type":"Text","value":" "},
30 {"type":"Operator","value":"="},
31 {"type":"Text","value":" "},
32 {"type":"Punctuation","value":"["},
33 {"type":"Text","value":"\n "},
34 {"type":"CommentSingle","value":"# Legacy interface exports traditional RFC 1521 Base64 encodings"},
35 {"type":"Text","value":"\n "},
36 {"type":"LiteralStringSingle","value":"'encode'"},
37 {"type":"Punctuation","value":","},
38 {"type":"Text","value":" "},
39 {"type":"LiteralStringSingle","value":"'decode'"},
40 {"type":"Punctuation","value":","},
41 {"type":"Text","value":" "},
42 {"type":"LiteralStringSingle","value":"'encodestring'"},
43 {"type":"Punctuation","value":","},
44 {"type":"Text","value":" "},
45 {"type":"LiteralStringSingle","value":"'decodestring'"},
46 {"type":"Punctuation","value":","},
47 {"type":"Text","value":"\n "},
48 {"type":"CommentSingle","value":"# Generalized interface for other encodings"},
49 {"type":"Text","value":"\n "},
50 {"type":"LiteralStringSingle","value":"'b64encode'"},
51 {"type":"Punctuation","value":","},
52 {"type":"Text","value":" "},
53 {"type":"LiteralStringSingle","value":"'b64decode'"},
54 {"type":"Punctuation","value":","},
55 {"type":"Text","value":" "},
56 {"type":"LiteralStringSingle","value":"'b32encode'"},
57 {"type":"Punctuation","value":","},
58 {"type":"Text","value":" "},
59 {"type":"LiteralStringSingle","value":"'b32decode'"},
60 {"type":"Punctuation","value":","},
61 {"type":"Text","value":"\n "},
62 {"type":"LiteralStringSingle","value":"'b16encode'"},
63 {"type":"Punctuation","value":","},
64 {"type":"Text","value":" "},
65 {"type":"LiteralStringSingle","value":"'b16decode'"},
66 {"type":"Punctuation","value":","},
67 {"type":"Text","value":"\n "},
68 {"type":"CommentSingle","value":"# Standard Base64 encoding"},
69 {"type":"Text","value":"\n "},
70 {"type":"LiteralStringSingle","value":"'standard_b64encode'"},
71 {"type":"Punctuation","value":","},
72 {"type":"Text","value":" "},
73 {"type":"LiteralStringSingle","value":"'standard_b64decode'"},
74 {"type":"Punctuation","value":","},
75 {"type":"Text","value":"\n "},
76 {"type":"CommentSingle","value":"# Some common Base64 alternatives. As referenced by RFC 3458, see thread"},
77 {"type":"Text","value":"\n "},
78 {"type":"CommentSingle","value":"# starting at:"},
79 {"type":"Text","value":"\n "},
80 {"type":"CommentSingle","value":"#"},
81 {"type":"Text","value":"\n "},
82 {"type":"CommentSingle","value":"# http://zgp.org/pipermail/p2p-hackers/2001-September/000316.html"},
83 {"type":"Text","value":"\n "},
84 {"type":"LiteralStringSingle","value":"'urlsafe_b64encode'"},
85 {"type":"Punctuation","value":","},
86 {"type":"Text","value":" "},
87 {"type":"LiteralStringSingle","value":"'urlsafe_b64decode'"},
88 {"type":"Punctuation","value":","},
89 {"type":"Text","value":"\n "},
90 {"type":"Punctuation","value":"]"},
91 {"type":"Text","value":"\n\n"},
92 {"type":"Name","value":"_translation"},
93 {"type":"Text","value":" "},
94 {"type":"Operator","value":"="},
95 {"type":"Text","value":" "},
96 {"type":"Punctuation","value":"["},
97 {"type":"NameBuiltin","value":"chr"},
98 {"type":"Punctuation","value":"("},
99 {"type":"Name","value":"_x"},
100 {"type":"Punctuation","value":")"},
101 {"type":"Text","value":" "},
102 {"type":"Keyword","value":"for"},
103 {"type":"Text","value":" "},
104 {"type":"Name","value":"_x"},
105 {"type":"Text","value":" "},
106 {"type":"OperatorWord","value":"in"},
107 {"type":"Text","value":" "},
108 {"type":"NameBuiltin","value":"range"},
109 {"type":"Punctuation","value":"("},
110 {"type":"LiteralNumberInteger","value":"256"},
111 {"type":"Punctuation","value":")]"},
112 {"type":"Text","value":"\n"},
113 {"type":"Name","value":"EMPTYSTRING"},
114 {"type":"Text","value":" "},
115 {"type":"Operator","value":"="},
116 {"type":"Text","value":" "},
117 {"type":"LiteralStringSingle","value":"''"},
118 {"type":"Text","value":"\n\n\n"},
119 {"type":"Keyword","value":"def"},
120 {"type":"Text","value":" "},
121 {"type":"NameFunction","value":"_translate"},
122 {"type":"Punctuation","value":"("},
123 {"type":"Name","value":"s"},
124 {"type":"Punctuation","value":","},
125 {"type":"Text","value":" "},
126 {"type":"Name","value":"altchars"},
127 {"type":"Punctuation","value":"):"},
128 {"type":"Text","value":"\n "},
129 {"type":"Name","value":"translation"},
130 {"type":"Text","value":" "},
131 {"type":"Operator","value":"="},
132 {"type":"Text","value":" "},
133 {"type":"Name","value":"_translation"},
134 {"type":"Punctuation","value":"[:]"},
135 {"type":"Text","value":"\n "},
136 {"type":"Keyword","value":"for"},
137 {"type":"Text","value":" "},
138 {"type":"Name","value":"k"},
139 {"type":"Punctuation","value":","},
140 {"type":"Text","value":" "},
141 {"type":"Name","value":"v"},
142 {"type":"Text","value":" "},
143 {"type":"OperatorWord","value":"in"},
144 {"type":"Text","value":" "},
145 {"type":"Name","value":"altchars"},
146 {"type":"Operator","value":"."},
147 {"type":"Name","value":"items"},
148 {"type":"Punctuation","value":"():"},
149 {"type":"Text","value":"\n "},
150 {"type":"Name","value":"translation"},
151 {"type":"Punctuation","value":"["},
152 {"type":"NameBuiltin","value":"ord"},
153 {"type":"Punctuation","value":"("},
154 {"type":"Name","value":"k"},
155 {"type":"Punctuation","value":")]"},
156 {"type":"Text","value":" "},
157 {"type":"Operator","value":"="},
158 {"type":"Text","value":" "},
159 {"type":"Name","value":"v"},
160 {"type":"Text","value":"\n "},
161 {"type":"Keyword","value":"return"},
162 {"type":"Text","value":" "},
163 {"type":"Name","value":"s"},
164 {"type":"Operator","value":"."},
165 {"type":"Name","value":"translate"},
166 {"type":"Punctuation","value":"("},
167 {"type":"LiteralStringSingle","value":"''"},
168 {"type":"Operator","value":"."},
169 {"type":"Name","value":"join"},
170 {"type":"Punctuation","value":"("},
171 {"type":"Name","value":"translation"},
172 {"type":"Punctuation","value":"))"},
173 {"type":"Text","value":"\n\n\n\u000c\n"},
174 {"type":"CommentSingle","value":"# Base64 encoding/decoding uses binascii"},
175 {"type":"Text","value":"\n\n"},
176 {"type":"Keyword","value":"def"},
177 {"type":"Text","value":" "},
178 {"type":"NameFunction","value":"b64encode"},
179 {"type":"Punctuation","value":"("},
180 {"type":"Name","value":"s"},
181 {"type":"Punctuation","value":","},
182 {"type":"Text","value":" "},
183 {"type":"Name","value":"altchars"},
184 {"type":"Operator","value":"="},
185 {"type":"NameBuiltinPseudo","value":"None"},
186 {"type":"Punctuation","value":"):"},
187 {"type":"Text","value":"\n "},
188 {"type":"LiteralStringDouble","value":"\"\"\"Encode a string using Base64.\n\n s is the string to encode. Optional altchars must be a string of at least\n length 2 (additional characters are ignored) which specifies an\n alternative alphabet for the '+' and '/' characters. This allows an\n application to e.g. generate url or filesystem safe Base64 strings.\n\n The encoded string is returned.\n \"\"\""},
189 {"type":"Text","value":"\n "},
190 {"type":"CommentSingle","value":"# Strip off the trailing newline"},
191 {"type":"Text","value":"\n "},
192 {"type":"Name","value":"encoded"},
193 {"type":"Text","value":" "},
194 {"type":"Operator","value":"="},
195 {"type":"Text","value":" "},
196 {"type":"Name","value":"binascii"},
197 {"type":"Operator","value":"."},
198 {"type":"Name","value":"b2a_base64"},
199 {"type":"Punctuation","value":"("},
200 {"type":"Name","value":"s"},
201 {"type":"Punctuation","value":")[:"},
202 {"type":"Operator","value":"-"},
203 {"type":"LiteralNumberInteger","value":"1"},
204 {"type":"Punctuation","value":"]"},
205 {"type":"Text","value":"\n "},
206 {"type":"Keyword","value":"if"},
207 {"type":"Text","value":" "},
208 {"type":"Name","value":"altchars"},
209 {"type":"Text","value":" "},
210 {"type":"OperatorWord","value":"is"},
211 {"type":"Text","value":" "},
212 {"type":"OperatorWord","value":"not"},
213 {"type":"Text","value":" "},
214 {"type":"NameBuiltinPseudo","value":"None"},
215 {"type":"Punctuation","value":":"},
216 {"type":"Text","value":"\n "},
217 {"type":"Keyword","value":"return"},
218 {"type":"Text","value":" "},
219 {"type":"Name","value":"encoded"},
220 {"type":"Operator","value":"."},
221 {"type":"Name","value":"translate"},
222 {"type":"Punctuation","value":"("},
223 {"type":"Name","value":"string"},
224 {"type":"Operator","value":"."},
225 {"type":"Name","value":"maketrans"},
226 {"type":"Punctuation","value":"("},
227 {"type":"LiteralStringAffix","value":"b"},
228 {"type":"LiteralStringSingle","value":"'+/'"},
229 {"type":"Punctuation","value":","},
230 {"type":"Text","value":" "},
231 {"type":"Name","value":"altchars"},
232 {"type":"Punctuation","value":"[:"},
233 {"type":"LiteralNumberInteger","value":"2"},
234 {"type":"Punctuation","value":"]))"},
235 {"type":"Text","value":"\n "},
236 {"type":"Keyword","value":"return"},
237 {"type":"Text","value":" "},
238 {"type":"Name","value":"encoded"},
239 {"type":"Text","value":"\n\n\n"},
240 {"type":"Keyword","value":"def"},
241 {"type":"Text","value":" "},
242 {"type":"NameFunction","value":"b64decode"},
243 {"type":"Punctuation","value":"("},
244 {"type":"Name","value":"s"},
245 {"type":"Punctuation","value":","},
246 {"type":"Text","value":" "},
247 {"type":"Name","value":"altchars"},
248 {"type":"Operator","value":"="},
249 {"type":"NameBuiltinPseudo","value":"None"},
250 {"type":"Punctuation","value":"):"},
251 {"type":"Text","value":"\n "},
252 {"type":"LiteralStringDouble","value":"\"\"\"Decode a Base64 encoded string.\n\n s is the string to decode. Optional altchars must be a string of at least\n length 2 (additional characters are ignored) which specifies the\n alternative alphabet used instead of the '+' and '/' characters.\n\n The decoded string is returned. A TypeError is raised if s is\n incorrectly padded. Characters that are neither in the normal base-64\n alphabet nor the alternative alphabet are discarded prior to the padding\n check.\n \"\"\""},
253 {"type":"Text","value":"\n "},
254 {"type":"Keyword","value":"if"},
255 {"type":"Text","value":" "},
256 {"type":"Name","value":"altchars"},
257 {"type":"Text","value":" "},
258 {"type":"OperatorWord","value":"is"},
259 {"type":"Text","value":" "},
260 {"type":"OperatorWord","value":"not"},
261 {"type":"Text","value":" "},
262 {"type":"NameBuiltinPseudo","value":"None"},
263 {"type":"Punctuation","value":":"},
264 {"type":"Text","value":"\n "},
265 {"type":"Name","value":"s"},
266 {"type":"Text","value":" "},
267 {"type":"Operator","value":"="},
268 {"type":"Text","value":" "},
269 {"type":"Name","value":"s"},
270 {"type":"Operator","value":"."},
271 {"type":"Name","value":"translate"},
272 {"type":"Punctuation","value":"("},
273 {"type":"Name","value":"string"},
274 {"type":"Operator","value":"."},
275 {"type":"Name","value":"maketrans"},
276 {"type":"Punctuation","value":"("},
277 {"type":"Name","value":"altchars"},
278 {"type":"Punctuation","value":"[:"},
279 {"type":"LiteralNumberInteger","value":"2"},
280 {"type":"Punctuation","value":"],"},
281 {"type":"Text","value":" "},
282 {"type":"LiteralStringSingle","value":"'+/'"},
283 {"type":"Punctuation","value":"))"},
284 {"type":"Text","value":"\n "},
285 {"type":"Keyword","value":"try"},
286 {"type":"Punctuation","value":":"},
287 {"type":"Text","value":"\n "},
288 {"type":"Keyword","value":"return"},
289 {"type":"Text","value":" "},
290 {"type":"Name","value":"binascii"},
291 {"type":"Operator","value":"."},
292 {"type":"Name","value":"a2b_base64"},
293 {"type":"Punctuation","value":"("},
294 {"type":"Name","value":"s"},
295 {"type":"Punctuation","value":")"},
296 {"type":"Text","value":"\n "},
297 {"type":"Keyword","value":"except"},
298 {"type":"Text","value":" "},
299 {"type":"Name","value":"binascii"},
300 {"type":"Operator","value":"."},
301 {"type":"Name","value":"Error"},
302 {"type":"Punctuation","value":","},
303 {"type":"Text","value":" "},
304 {"type":"Name","value":"msg"},
305 {"type":"Punctuation","value":":"},
306 {"type":"Text","value":"\n "},
307 {"type":"CommentSingle","value":"# Transform this exception for consistency"},
308 {"type":"Text","value":"\n "},
309 {"type":"Keyword","value":"raise"},
310 {"type":"Text","value":" "},
311 {"type":"NameException","value":"TypeError"},
312 {"type":"Punctuation","value":"("},
313 {"type":"Name","value":"msg"},
314 {"type":"Punctuation","value":")"},
315 {"type":"Text","value":"\n\n\n"},
316 {"type":"Keyword","value":"def"},
317 {"type":"Text","value":" "},
318 {"type":"NameFunction","value":"standard_b64encode"},
319 {"type":"Punctuation","value":"("},
320 {"type":"Name","value":"s"},
321 {"type":"Punctuation","value":"):"},
322 {"type":"Text","value":"\n "},
323 {"type":"LiteralStringDouble","value":"\"\"\"Encode a string using the standard Base64 alphabet.\n\n s is the string to encode. The encoded string is returned.\n \"\"\""},
324 {"type":"Text","value":"\n "},
325 {"type":"Keyword","value":"return"},
326 {"type":"Text","value":" "},
327 {"type":"Name","value":"b64encode"},
328 {"type":"Punctuation","value":"("},
329 {"type":"Name","value":"s"},
330 {"type":"Punctuation","value":")"},
331 {"type":"Text","value":"\n\n"},
332 {"type":"Keyword","value":"def"},
333 {"type":"Text","value":" "},
334 {"type":"NameFunction","value":"standard_b64decode"},
335 {"type":"Punctuation","value":"("},
336 {"type":"Name","value":"s"},
337 {"type":"Punctuation","value":"):"},
338 {"type":"Text","value":"\n "},
339 {"type":"LiteralStringDouble","value":"\"\"\"Decode a string encoded with the standard Base64 alphabet.\n\n Argument s is the string to decode. The decoded string is returned. A\n TypeError is raised if the string is incorrectly padded. Characters that\n are not in the standard alphabet are discarded prior to the padding\n check.\n \"\"\""},
340 {"type":"Text","value":"\n "},
341 {"type":"Keyword","value":"return"},
342 {"type":"Text","value":" "},
343 {"type":"Name","value":"b64decode"},
344 {"type":"Punctuation","value":"("},
345 {"type":"Name","value":"s"},
346 {"type":"Punctuation","value":")"},
347 {"type":"Text","value":"\n\n"},
348 {"type":"Name","value":"_urlsafe_encode_translation"},
349 {"type":"Text","value":" "},
350 {"type":"Operator","value":"="},
351 {"type":"Text","value":" "},
352 {"type":"Name","value":"string"},
353 {"type":"Operator","value":"."},
354 {"type":"Name","value":"maketrans"},
355 {"type":"Punctuation","value":"("},
356 {"type":"LiteralStringAffix","value":"b"},
357 {"type":"LiteralStringSingle","value":"'+/'"},
358 {"type":"Punctuation","value":","},
359 {"type":"Text","value":" "},
360 {"type":"LiteralStringAffix","value":"b"},
361 {"type":"LiteralStringSingle","value":"'-_'"},
362 {"type":"Punctuation","value":")"},
363 {"type":"Text","value":"\n"},
364 {"type":"Name","value":"_urlsafe_decode_translation"},
365 {"type":"Text","value":" "},
366 {"type":"Operator","value":"="},
367 {"type":"Text","value":" "},
368 {"type":"Name","value":"string"},
369 {"type":"Operator","value":"."},
370 {"type":"Name","value":"maketrans"},
371 {"type":"Punctuation","value":"("},
372 {"type":"LiteralStringAffix","value":"b"},
373 {"type":"LiteralStringSingle","value":"'-_'"},
374 {"type":"Punctuation","value":","},
375 {"type":"Text","value":" "},
376 {"type":"LiteralStringAffix","value":"b"},
377 {"type":"LiteralStringSingle","value":"'+/'"},
378 {"type":"Punctuation","value":")"},
379 {"type":"Text","value":"\n\n"},
380 {"type":"Keyword","value":"def"},
381 {"type":"Text","value":" "},
382 {"type":"NameFunction","value":"urlsafe_b64encode"},
383 {"type":"Punctuation","value":"("},
384 {"type":"Name","value":"s"},
385 {"type":"Punctuation","value":"):"},
386 {"type":"Text","value":"\n "},
387 {"type":"LiteralStringDouble","value":"\"\"\"Encode a string using the URL- and filesystem-safe Base64 alphabet.\n\n Argument s is the string to encode. The encoded string is returned. The\n alphabet uses '-' instead of '+' and '_' instead of '/'.\n \"\"\""},
388 {"type":"Text","value":"\n "},
389 {"type":"Keyword","value":"return"},
390 {"type":"Text","value":" "},
391 {"type":"Name","value":"b64encode"},
392 {"type":"Punctuation","value":"("},
393 {"type":"Name","value":"s"},
394 {"type":"Punctuation","value":")"},
395 {"type":"Operator","value":"."},
396 {"type":"Name","value":"translate"},
397 {"type":"Punctuation","value":"("},
398 {"type":"Name","value":"_urlsafe_encode_translation"},
399 {"type":"Punctuation","value":")"},
400 {"type":"Text","value":"\n\n"},
401 {"type":"Keyword","value":"def"},
402 {"type":"Text","value":" "},
403 {"type":"NameFunction","value":"urlsafe_b64decode"},
404 {"type":"Punctuation","value":"("},
405 {"type":"Name","value":"s"},
406 {"type":"Punctuation","value":"):"},
407 {"type":"Text","value":"\n "},
408 {"type":"LiteralStringDouble","value":"\"\"\"Decode a string using the URL- and filesystem-safe Base64 alphabet.\n\n Argument s is the string to decode. The decoded string is returned. A\n TypeError is raised if the string is incorrectly padded. Characters that\n are not in the URL-safe base-64 alphabet, and are not a plus '+' or slash\n '/', are discarded prior to the padding check.\n\n The alphabet uses '-' instead of '+' and '_' instead of '/'.\n \"\"\""},
409 {"type":"Text","value":"\n "},
410 {"type":"Keyword","value":"return"},
411 {"type":"Text","value":" "},
412 {"type":"Name","value":"b64decode"},
413 {"type":"Punctuation","value":"("},
414 {"type":"Name","value":"s"},
415 {"type":"Operator","value":"."},
416 {"type":"Name","value":"translate"},
417 {"type":"Punctuation","value":"("},
418 {"type":"Name","value":"_urlsafe_decode_translation"},
419 {"type":"Punctuation","value":"))"},
420 {"type":"Text","value":"\n\n\n\u000c\n"},
421 {"type":"CommentSingle","value":"# Base32 encoding/decoding must be done in Python"},
422 {"type":"Text","value":"\n"},
423 {"type":"Name","value":"_b32alphabet"},
424 {"type":"Text","value":" "},
425 {"type":"Operator","value":"="},
426 {"type":"Text","value":" "},
427 {"type":"Punctuation","value":"{"},
428 {"type":"Text","value":"\n "},
429 {"type":"LiteralNumberInteger","value":"0"},
430 {"type":"Punctuation","value":":"},
431 {"type":"Text","value":" "},
432 {"type":"LiteralStringSingle","value":"'A'"},
433 {"type":"Punctuation","value":","},
434 {"type":"Text","value":" "},
435 {"type":"LiteralNumberInteger","value":"9"},
436 {"type":"Punctuation","value":":"},
437 {"type":"Text","value":" "},
438 {"type":"LiteralStringSingle","value":"'J'"},
439 {"type":"Punctuation","value":","},
440 {"type":"Text","value":" "},
441 {"type":"LiteralNumberInteger","value":"18"},
442 {"type":"Punctuation","value":":"},
443 {"type":"Text","value":" "},
444 {"type":"LiteralStringSingle","value":"'S'"},
445 {"type":"Punctuation","value":","},
446 {"type":"Text","value":" "},
447 {"type":"LiteralNumberInteger","value":"27"},
448 {"type":"Punctuation","value":":"},
449 {"type":"Text","value":" "},
450 {"type":"LiteralStringSingle","value":"'3'"},
451 {"type":"Punctuation","value":","},
452 {"type":"Text","value":"\n "},
453 {"type":"LiteralNumberInteger","value":"1"},
454 {"type":"Punctuation","value":":"},
455 {"type":"Text","value":" "},
456 {"type":"LiteralStringSingle","value":"'B'"},
457 {"type":"Punctuation","value":","},
458 {"type":"Text","value":" "},
459 {"type":"LiteralNumberInteger","value":"10"},
460 {"type":"Punctuation","value":":"},
461 {"type":"Text","value":" "},
462 {"type":"LiteralStringSingle","value":"'K'"},
463 {"type":"Punctuation","value":","},
464 {"type":"Text","value":" "},
465 {"type":"LiteralNumberInteger","value":"19"},
466 {"type":"Punctuation","value":":"},
467 {"type":"Text","value":" "},
468 {"type":"LiteralStringSingle","value":"'T'"},
469 {"type":"Punctuation","value":","},
470 {"type":"Text","value":" "},
471 {"type":"LiteralNumberInteger","value":"28"},
472 {"type":"Punctuation","value":":"},
473 {"type":"Text","value":" "},
474 {"type":"LiteralStringSingle","value":"'4'"},
475 {"type":"Punctuation","value":","},
476 {"type":"Text","value":"\n "},
477 {"type":"LiteralNumberInteger","value":"2"},
478 {"type":"Punctuation","value":":"},
479 {"type":"Text","value":" "},
480 {"type":"LiteralStringSingle","value":"'C'"},
481 {"type":"Punctuation","value":","},
482 {"type":"Text","value":" "},
483 {"type":"LiteralNumberInteger","value":"11"},
484 {"type":"Punctuation","value":":"},
485 {"type":"Text","value":" "},
486 {"type":"LiteralStringSingle","value":"'L'"},
487 {"type":"Punctuation","value":","},
488 {"type":"Text","value":" "},
489 {"type":"LiteralNumberInteger","value":"20"},
490 {"type":"Punctuation","value":":"},
491 {"type":"Text","value":" "},
492 {"type":"LiteralStringSingle","value":"'U'"},
493 {"type":"Punctuation","value":","},
494 {"type":"Text","value":" "},
495 {"type":"LiteralNumberInteger","value":"29"},
496 {"type":"Punctuation","value":":"},
497 {"type":"Text","value":" "},
498 {"type":"LiteralStringSingle","value":"'5'"},
499 {"type":"Punctuation","value":","},
500 {"type":"Text","value":"\n "},
501 {"type":"LiteralNumberInteger","value":"3"},
502 {"type":"Punctuation","value":":"},
503 {"type":"Text","value":" "},
504 {"type":"LiteralStringSingle","value":"'D'"},
505 {"type":"Punctuation","value":","},
506 {"type":"Text","value":" "},
507 {"type":"LiteralNumberInteger","value":"12"},
508 {"type":"Punctuation","value":":"},
509 {"type":"Text","value":" "},
510 {"type":"LiteralStringSingle","value":"'M'"},
511 {"type":"Punctuation","value":","},
512 {"type":"Text","value":" "},
513 {"type":"LiteralNumberInteger","value":"21"},
514 {"type":"Punctuation","value":":"},
515 {"type":"Text","value":" "},
516 {"type":"LiteralStringSingle","value":"'V'"},
517 {"type":"Punctuation","value":","},
518 {"type":"Text","value":" "},
519 {"type":"LiteralNumberInteger","value":"30"},
520 {"type":"Punctuation","value":":"},
521 {"type":"Text","value":" "},
522 {"type":"LiteralStringSingle","value":"'6'"},
523 {"type":"Punctuation","value":","},
524 {"type":"Text","value":"\n "},
525 {"type":"LiteralNumberInteger","value":"4"},
526 {"type":"Punctuation","value":":"},
527 {"type":"Text","value":" "},
528 {"type":"LiteralStringSingle","value":"'E'"},
529 {"type":"Punctuation","value":","},
530 {"type":"Text","value":" "},
531 {"type":"LiteralNumberInteger","value":"13"},
532 {"type":"Punctuation","value":":"},
533 {"type":"Text","value":" "},
534 {"type":"LiteralStringSingle","value":"'N'"},
535 {"type":"Punctuation","value":","},
536 {"type":"Text","value":" "},
537 {"type":"LiteralNumberInteger","value":"22"},
538 {"type":"Punctuation","value":":"},
539 {"type":"Text","value":" "},
540 {"type":"LiteralStringSingle","value":"'W'"},
541 {"type":"Punctuation","value":","},
542 {"type":"Text","value":" "},
543 {"type":"LiteralNumberInteger","value":"31"},
544 {"type":"Punctuation","value":":"},
545 {"type":"Text","value":" "},
546 {"type":"LiteralStringSingle","value":"'7'"},
547 {"type":"Punctuation","value":","},
548 {"type":"Text","value":"\n "},
549 {"type":"LiteralNumberInteger","value":"5"},
550 {"type":"Punctuation","value":":"},
551 {"type":"Text","value":" "},
552 {"type":"LiteralStringSingle","value":"'F'"},
553 {"type":"Punctuation","value":","},
554 {"type":"Text","value":" "},
555 {"type":"LiteralNumberInteger","value":"14"},
556 {"type":"Punctuation","value":":"},
557 {"type":"Text","value":" "},
558 {"type":"LiteralStringSingle","value":"'O'"},
559 {"type":"Punctuation","value":","},
560 {"type":"Text","value":" "},
561 {"type":"LiteralNumberInteger","value":"23"},
562 {"type":"Punctuation","value":":"},
563 {"type":"Text","value":" "},
564 {"type":"LiteralStringSingle","value":"'X'"},
565 {"type":"Punctuation","value":","},
566 {"type":"Text","value":"\n "},
567 {"type":"LiteralNumberInteger","value":"6"},
568 {"type":"Punctuation","value":":"},
569 {"type":"Text","value":" "},
570 {"type":"LiteralStringSingle","value":"'G'"},
571 {"type":"Punctuation","value":","},
572 {"type":"Text","value":" "},
573 {"type":"LiteralNumberInteger","value":"15"},
574 {"type":"Punctuation","value":":"},
575 {"type":"Text","value":" "},
576 {"type":"LiteralStringSingle","value":"'P'"},
577 {"type":"Punctuation","value":","},
578 {"type":"Text","value":" "},
579 {"type":"LiteralNumberInteger","value":"24"},
580 {"type":"Punctuation","value":":"},
581 {"type":"Text","value":" "},
582 {"type":"LiteralStringSingle","value":"'Y'"},
583 {"type":"Punctuation","value":","},
584 {"type":"Text","value":"\n "},
585 {"type":"LiteralNumberInteger","value":"7"},
586 {"type":"Punctuation","value":":"},
587 {"type":"Text","value":" "},
588 {"type":"LiteralStringSingle","value":"'H'"},
589 {"type":"Punctuation","value":","},
590 {"type":"Text","value":" "},
591 {"type":"LiteralNumberInteger","value":"16"},
592 {"type":"Punctuation","value":":"},
593 {"type":"Text","value":" "},
594 {"type":"LiteralStringSingle","value":"'Q'"},
595 {"type":"Punctuation","value":","},
596 {"type":"Text","value":" "},
597 {"type":"LiteralNumberInteger","value":"25"},
598 {"type":"Punctuation","value":":"},
599 {"type":"Text","value":" "},
600 {"type":"LiteralStringSingle","value":"'Z'"},
601 {"type":"Punctuation","value":","},
602 {"type":"Text","value":"\n "},
603 {"type":"LiteralNumberInteger","value":"8"},
604 {"type":"Punctuation","value":":"},
605 {"type":"Text","value":" "},
606 {"type":"LiteralStringSingle","value":"'I'"},
607 {"type":"Punctuation","value":","},
608 {"type":"Text","value":" "},
609 {"type":"LiteralNumberInteger","value":"17"},
610 {"type":"Punctuation","value":":"},
611 {"type":"Text","value":" "},
612 {"type":"LiteralStringSingle","value":"'R'"},
613 {"type":"Punctuation","value":","},
614 {"type":"Text","value":" "},
615 {"type":"LiteralNumberInteger","value":"26"},
616 {"type":"Punctuation","value":":"},
617 {"type":"Text","value":" "},
618 {"type":"LiteralStringSingle","value":"'2'"},
619 {"type":"Punctuation","value":","},
620 {"type":"Text","value":"\n "},
621 {"type":"Punctuation","value":"}"},
622 {"type":"Text","value":"\n\n"},
623 {"type":"Name","value":"_b32tab"},
624 {"type":"Text","value":" "},
625 {"type":"Operator","value":"="},
626 {"type":"Text","value":" "},
627 {"type":"Name","value":"_b32alphabet"},
628 {"type":"Operator","value":"."},
629 {"type":"Name","value":"items"},
630 {"type":"Punctuation","value":"()"},
631 {"type":"Text","value":"\n"},
632 {"type":"Name","value":"_b32tab"},
633 {"type":"Operator","value":"."},
634 {"type":"Name","value":"sort"},
635 {"type":"Punctuation","value":"()"},
636 {"type":"Text","value":"\n"},
637 {"type":"Name","value":"_b32tab"},
638 {"type":"Text","value":" "},
639 {"type":"Operator","value":"="},
640 {"type":"Text","value":" "},
641 {"type":"Punctuation","value":"["},
642 {"type":"Name","value":"v"},
643 {"type":"Text","value":" "},
644 {"type":"Keyword","value":"for"},
645 {"type":"Text","value":" "},
646 {"type":"Name","value":"k"},
647 {"type":"Punctuation","value":","},
648 {"type":"Text","value":" "},
649 {"type":"Name","value":"v"},
650 {"type":"Text","value":" "},
651 {"type":"OperatorWord","value":"in"},
652 {"type":"Text","value":" "},
653 {"type":"Name","value":"_b32tab"},
654 {"type":"Punctuation","value":"]"},
655 {"type":"Text","value":"\n"},
656 {"type":"Name","value":"_b32rev"},
657 {"type":"Text","value":" "},
658 {"type":"Operator","value":"="},
659 {"type":"Text","value":" "},
660 {"type":"NameBuiltin","value":"dict"},
661 {"type":"Punctuation","value":"([("},
662 {"type":"Name","value":"v"},
663 {"type":"Punctuation","value":","},
664 {"type":"Text","value":" "},
665 {"type":"NameBuiltin","value":"long"},
666 {"type":"Punctuation","value":"("},
667 {"type":"Name","value":"k"},
668 {"type":"Punctuation","value":"))"},
669 {"type":"Text","value":" "},
670 {"type":"Keyword","value":"for"},
671 {"type":"Text","value":" "},
672 {"type":"Name","value":"k"},
673 {"type":"Punctuation","value":","},
674 {"type":"Text","value":" "},
675 {"type":"Name","value":"v"},
676 {"type":"Text","value":" "},
677 {"type":"OperatorWord","value":"in"},
678 {"type":"Text","value":" "},
679 {"type":"Name","value":"_b32alphabet"},
680 {"type":"Operator","value":"."},
681 {"type":"Name","value":"items"},
682 {"type":"Punctuation","value":"()])"},
683 {"type":"Text","value":"\n\n\n"},
684 {"type":"Keyword","value":"def"},
685 {"type":"Text","value":" "},
686 {"type":"NameFunction","value":"b32encode"},
687 {"type":"Punctuation","value":"("},
688 {"type":"Name","value":"s"},
689 {"type":"Punctuation","value":"):"},
690 {"type":"Text","value":"\n "},
691 {"type":"LiteralStringDouble","value":"\"\"\"Encode a string using Base32.\n\n s is the string to encode. The encoded string is returned.\n \"\"\""},
692 {"type":"Text","value":"\n "},
693 {"type":"Name","value":"parts"},
694 {"type":"Text","value":" "},
695 {"type":"Operator","value":"="},
696 {"type":"Text","value":" "},
697 {"type":"Punctuation","value":"[]"},
698 {"type":"Text","value":"\n "},
699 {"type":"Name","value":"quanta"},
700 {"type":"Punctuation","value":","},
701 {"type":"Text","value":" "},
702 {"type":"Name","value":"leftover"},
703 {"type":"Text","value":" "},
704 {"type":"Operator","value":"="},
705 {"type":"Text","value":" "},
706 {"type":"NameBuiltin","value":"divmod"},
707 {"type":"Punctuation","value":"("},
708 {"type":"NameBuiltin","value":"len"},
709 {"type":"Punctuation","value":"("},
710 {"type":"Name","value":"s"},
711 {"type":"Punctuation","value":"),"},
712 {"type":"Text","value":" "},
713 {"type":"LiteralNumberInteger","value":"5"},
714 {"type":"Punctuation","value":")"},
715 {"type":"Text","value":"\n "},
716 {"type":"CommentSingle","value":"# Pad the last quantum with zero bits if necessary"},
717 {"type":"Text","value":"\n "},
718 {"type":"Keyword","value":"if"},
719 {"type":"Text","value":" "},
720 {"type":"Name","value":"leftover"},
721 {"type":"Punctuation","value":":"},
722 {"type":"Text","value":"\n "},
723 {"type":"Name","value":"s"},
724 {"type":"Text","value":" "},
725 {"type":"Operator","value":"+="},
726 {"type":"Text","value":" "},
727 {"type":"Punctuation","value":"("},
728 {"type":"LiteralStringSingle","value":"'"},
729 {"type":"LiteralStringEscape","value":"\\0"},
730 {"type":"LiteralStringSingle","value":"'"},
731 {"type":"Text","value":" "},
732 {"type":"Operator","value":"*"},
733 {"type":"Text","value":" "},
734 {"type":"Punctuation","value":"("},
735 {"type":"LiteralNumberInteger","value":"5"},
736 {"type":"Text","value":" "},
737 {"type":"Operator","value":"-"},
738 {"type":"Text","value":" "},
739 {"type":"Name","value":"leftover"},
740 {"type":"Punctuation","value":"))"},
741 {"type":"Text","value":"\n "},
742 {"type":"Name","value":"quanta"},
743 {"type":"Text","value":" "},
744 {"type":"Operator","value":"+="},
745 {"type":"Text","value":" "},
746 {"type":"LiteralNumberInteger","value":"1"},
747 {"type":"Text","value":"\n "},
748 {"type":"Keyword","value":"for"},
749 {"type":"Text","value":" "},
750 {"type":"Name","value":"i"},
751 {"type":"Text","value":" "},
752 {"type":"OperatorWord","value":"in"},
753 {"type":"Text","value":" "},
754 {"type":"NameBuiltin","value":"range"},
755 {"type":"Punctuation","value":"("},
756 {"type":"Name","value":"quanta"},
757 {"type":"Punctuation","value":"):"},
758 {"type":"Text","value":"\n "},
759 {"type":"CommentSingle","value":"# c1 and c2 are 16 bits wide, c3 is 8 bits wide. The intent of this"},
760 {"type":"Text","value":"\n "},
761 {"type":"CommentSingle","value":"# code is to process the 40 bits in units of 5 bits. So we take the 1"},
762 {"type":"Text","value":"\n "},
763 {"type":"CommentSingle","value":"# leftover bit of c1 and tack it onto c2. Then we take the 2 leftover"},
764 {"type":"Text","value":"\n "},
765 {"type":"CommentSingle","value":"# bits of c2 and tack them onto c3. The shifts and masks are intended"},
766 {"type":"Text","value":"\n "},
767 {"type":"CommentSingle","value":"# to give us values of exactly 5 bits in width."},
768 {"type":"Text","value":"\n "},
769 {"type":"Name","value":"c1"},
770 {"type":"Punctuation","value":","},
771 {"type":"Text","value":" "},
772 {"type":"Name","value":"c2"},
773 {"type":"Punctuation","value":","},
774 {"type":"Text","value":" "},
775 {"type":"Name","value":"c3"},
776 {"type":"Text","value":" "},
777 {"type":"Operator","value":"="},
778 {"type":"Text","value":" "},
779 {"type":"Name","value":"struct"},
780 {"type":"Operator","value":"."},
781 {"type":"Name","value":"unpack"},
782 {"type":"Punctuation","value":"("},
783 {"type":"LiteralStringSingle","value":"'!HHB'"},
784 {"type":"Punctuation","value":","},
785 {"type":"Text","value":" "},
786 {"type":"Name","value":"s"},
787 {"type":"Punctuation","value":"["},
788 {"type":"Name","value":"i"},
789 {"type":"Operator","value":"*"},
790 {"type":"LiteralNumberInteger","value":"5"},
791 {"type":"Punctuation","value":":("},
792 {"type":"Name","value":"i"},
793 {"type":"Operator","value":"+"},
794 {"type":"LiteralNumberInteger","value":"1"},
795 {"type":"Punctuation","value":")"},
796 {"type":"Operator","value":"*"},
797 {"type":"LiteralNumberInteger","value":"5"},
798 {"type":"Punctuation","value":"])"},
799 {"type":"Text","value":"\n "},
800 {"type":"Name","value":"c2"},
801 {"type":"Text","value":" "},
802 {"type":"Operator","value":"+="},
803 {"type":"Text","value":" "},
804 {"type":"Punctuation","value":"("},
805 {"type":"Name","value":"c1"},
806 {"type":"Text","value":" "},
807 {"type":"Operator","value":"\u0026"},
808 {"type":"Text","value":" "},
809 {"type":"LiteralNumberInteger","value":"1"},
810 {"type":"Punctuation","value":")"},
811 {"type":"Text","value":" "},
812 {"type":"Operator","value":"\u003c\u003c"},
813 {"type":"Text","value":" "},
814 {"type":"LiteralNumberInteger","value":"16"},
815 {"type":"Text","value":" "},
816 {"type":"CommentSingle","value":"# 17 bits wide"},
817 {"type":"Text","value":"\n "},
818 {"type":"Name","value":"c3"},
819 {"type":"Text","value":" "},
820 {"type":"Operator","value":"+="},
821 {"type":"Text","value":" "},
822 {"type":"Punctuation","value":"("},
823 {"type":"Name","value":"c2"},
824 {"type":"Text","value":" "},
825 {"type":"Operator","value":"\u0026"},
826 {"type":"Text","value":" "},
827 {"type":"LiteralNumberInteger","value":"3"},
828 {"type":"Punctuation","value":")"},
829 {"type":"Text","value":" "},
830 {"type":"Operator","value":"\u003c\u003c"},
831 {"type":"Text","value":" "},
832 {"type":"LiteralNumberInteger","value":"8"},
833 {"type":"Text","value":" "},
834 {"type":"CommentSingle","value":"# 10 bits wide"},
835 {"type":"Text","value":"\n "},
836 {"type":"Name","value":"parts"},
837 {"type":"Operator","value":"."},
838 {"type":"Name","value":"extend"},
839 {"type":"Punctuation","value":"(["},
840 {"type":"Name","value":"_b32tab"},
841 {"type":"Punctuation","value":"["},
842 {"type":"Name","value":"c1"},
843 {"type":"Text","value":" "},
844 {"type":"Operator","value":"\u003e\u003e"},
845 {"type":"Text","value":" "},
846 {"type":"LiteralNumberInteger","value":"11"},
847 {"type":"Punctuation","value":"],"},
848 {"type":"Text","value":" "},
849 {"type":"CommentSingle","value":"# bits 1 - 5"},
850 {"type":"Text","value":"\n "},
851 {"type":"Name","value":"_b32tab"},
852 {"type":"Punctuation","value":"[("},
853 {"type":"Name","value":"c1"},
854 {"type":"Text","value":" "},
855 {"type":"Operator","value":"\u003e\u003e"},
856 {"type":"Text","value":" "},
857 {"type":"LiteralNumberInteger","value":"6"},
858 {"type":"Punctuation","value":")"},
859 {"type":"Text","value":" "},
860 {"type":"Operator","value":"\u0026"},
861 {"type":"Text","value":" "},
862 {"type":"LiteralNumberHex","value":"0x1f"},
863 {"type":"Punctuation","value":"],"},
864 {"type":"Text","value":" "},
865 {"type":"CommentSingle","value":"# bits 6 - 10"},
866 {"type":"Text","value":"\n "},
867 {"type":"Name","value":"_b32tab"},
868 {"type":"Punctuation","value":"[("},
869 {"type":"Name","value":"c1"},
870 {"type":"Text","value":" "},
871 {"type":"Operator","value":"\u003e\u003e"},
872 {"type":"Text","value":" "},
873 {"type":"LiteralNumberInteger","value":"1"},
874 {"type":"Punctuation","value":")"},
875 {"type":"Text","value":" "},
876 {"type":"Operator","value":"\u0026"},
877 {"type":"Text","value":" "},
878 {"type":"LiteralNumberHex","value":"0x1f"},
879 {"type":"Punctuation","value":"],"},
880 {"type":"Text","value":" "},
881 {"type":"CommentSingle","value":"# bits 11 - 15"},
882 {"type":"Text","value":"\n "},
883 {"type":"Name","value":"_b32tab"},
884 {"type":"Punctuation","value":"["},
885 {"type":"Name","value":"c2"},
886 {"type":"Text","value":" "},
887 {"type":"Operator","value":"\u003e\u003e"},
888 {"type":"Text","value":" "},
889 {"type":"LiteralNumberInteger","value":"12"},
890 {"type":"Punctuation","value":"],"},
891 {"type":"Text","value":" "},
892 {"type":"CommentSingle","value":"# bits 16 - 20 (1 - 5)"},
893 {"type":"Text","value":"\n "},
894 {"type":"Name","value":"_b32tab"},
895 {"type":"Punctuation","value":"[("},
896 {"type":"Name","value":"c2"},
897 {"type":"Text","value":" "},
898 {"type":"Operator","value":"\u003e\u003e"},
899 {"type":"Text","value":" "},
900 {"type":"LiteralNumberInteger","value":"7"},
901 {"type":"Punctuation","value":")"},
902 {"type":"Text","value":" "},
903 {"type":"Operator","value":"\u0026"},
904 {"type":"Text","value":" "},
905 {"type":"LiteralNumberHex","value":"0x1f"},
906 {"type":"Punctuation","value":"],"},
907 {"type":"Text","value":" "},
908 {"type":"CommentSingle","value":"# bits 21 - 25 (6 - 10)"},
909 {"type":"Text","value":"\n "},
910 {"type":"Name","value":"_b32tab"},
911 {"type":"Punctuation","value":"[("},
912 {"type":"Name","value":"c2"},
913 {"type":"Text","value":" "},
914 {"type":"Operator","value":"\u003e\u003e"},
915 {"type":"Text","value":" "},
916 {"type":"LiteralNumberInteger","value":"2"},
917 {"type":"Punctuation","value":")"},
918 {"type":"Text","value":" "},
919 {"type":"Operator","value":"\u0026"},
920 {"type":"Text","value":" "},
921 {"type":"LiteralNumberHex","value":"0x1f"},
922 {"type":"Punctuation","value":"],"},
923 {"type":"Text","value":" "},
924 {"type":"CommentSingle","value":"# bits 26 - 30 (11 - 15)"},
925 {"type":"Text","value":"\n "},
926 {"type":"Name","value":"_b32tab"},
927 {"type":"Punctuation","value":"["},
928 {"type":"Name","value":"c3"},
929 {"type":"Text","value":" "},
930 {"type":"Operator","value":"\u003e\u003e"},
931 {"type":"Text","value":" "},
932 {"type":"LiteralNumberInteger","value":"5"},
933 {"type":"Punctuation","value":"],"},
934 {"type":"Text","value":" "},
935 {"type":"CommentSingle","value":"# bits 31 - 35 (1 - 5)"},
936 {"type":"Text","value":"\n "},
937 {"type":"Name","value":"_b32tab"},
938 {"type":"Punctuation","value":"["},
939 {"type":"Name","value":"c3"},
940 {"type":"Text","value":" "},
941 {"type":"Operator","value":"\u0026"},
942 {"type":"Text","value":" "},
943 {"type":"LiteralNumberHex","value":"0x1f"},
944 {"type":"Punctuation","value":"],"},
945 {"type":"Text","value":" "},
946 {"type":"CommentSingle","value":"# bits 36 - 40 (1 - 5)"},
947 {"type":"Text","value":"\n "},
948 {"type":"Punctuation","value":"])"},
949 {"type":"Text","value":"\n "},
950 {"type":"Name","value":"encoded"},
951 {"type":"Text","value":" "},
952 {"type":"Operator","value":"="},
953 {"type":"Text","value":" "},
954 {"type":"Name","value":"EMPTYSTRING"},
955 {"type":"Operator","value":"."},
956 {"type":"Name","value":"join"},
957 {"type":"Punctuation","value":"("},
958 {"type":"Name","value":"parts"},
959 {"type":"Punctuation","value":")"},
960 {"type":"Text","value":"\n "},
961 {"type":"CommentSingle","value":"# Adjust for any leftover partial quanta"},
962 {"type":"Text","value":"\n "},
963 {"type":"Keyword","value":"if"},
964 {"type":"Text","value":" "},
965 {"type":"Name","value":"leftover"},
966 {"type":"Text","value":" "},
967 {"type":"Operator","value":"=="},
968 {"type":"Text","value":" "},
969 {"type":"LiteralNumberInteger","value":"1"},
970 {"type":"Punctuation","value":":"},
971 {"type":"Text","value":"\n "},
972 {"type":"Keyword","value":"return"},
973 {"type":"Text","value":" "},
974 {"type":"Name","value":"encoded"},
975 {"type":"Punctuation","value":"[:"},
976 {"type":"Operator","value":"-"},
977 {"type":"LiteralNumberInteger","value":"6"},
978 {"type":"Punctuation","value":"]"},
979 {"type":"Text","value":" "},
980 {"type":"Operator","value":"+"},
981 {"type":"Text","value":" "},
982 {"type":"LiteralStringSingle","value":"'======'"},
983 {"type":"Text","value":"\n "},
984 {"type":"Keyword","value":"elif"},
985 {"type":"Text","value":" "},
986 {"type":"Name","value":"leftover"},
987 {"type":"Text","value":" "},
988 {"type":"Operator","value":"=="},
989 {"type":"Text","value":" "},
990 {"type":"LiteralNumberInteger","value":"2"},
991 {"type":"Punctuation","value":":"},
992 {"type":"Text","value":"\n "},
993 {"type":"Keyword","value":"return"},
994 {"type":"Text","value":" "},
995 {"type":"Name","value":"encoded"},
996 {"type":"Punctuation","value":"[:"},
997 {"type":"Operator","value":"-"},
998 {"type":"LiteralNumberInteger","value":"4"},
999 {"type":"Punctuation","value":"]"},
1000 {"type":"Text","value":" "},
1001 {"type":"Operator","value":"+"},
1002 {"type":"Text","value":" "},
1003 {"type":"LiteralStringSingle","value":"'===='"},
1004 {"type":"Text","value":"\n "},
1005 {"type":"Keyword","value":"elif"},
1006 {"type":"Text","value":" "},
1007 {"type":"Name","value":"leftover"},
1008 {"type":"Text","value":" "},
1009 {"type":"Operator","value":"=="},
1010 {"type":"Text","value":" "},
1011 {"type":"LiteralNumberInteger","value":"3"},
1012 {"type":"Punctuation","value":":"},
1013 {"type":"Text","value":"\n "},
1014 {"type":"Keyword","value":"return"},
1015 {"type":"Text","value":" "},
1016 {"type":"Name","value":"encoded"},
1017 {"type":"Punctuation","value":"[:"},
1018 {"type":"Operator","value":"-"},
1019 {"type":"LiteralNumberInteger","value":"3"},
1020 {"type":"Punctuation","value":"]"},
1021 {"type":"Text","value":" "},
1022 {"type":"Operator","value":"+"},
1023 {"type":"Text","value":" "},
1024 {"type":"LiteralStringSingle","value":"'==='"},
1025 {"type":"Text","value":"\n "},
1026 {"type":"Keyword","value":"elif"},
1027 {"type":"Text","value":" "},
1028 {"type":"Name","value":"leftover"},
1029 {"type":"Text","value":" "},
1030 {"type":"Operator","value":"=="},
1031 {"type":"Text","value":" "},
1032 {"type":"LiteralNumberInteger","value":"4"},
1033 {"type":"Punctuation","value":":"},
1034 {"type":"Text","value":"\n "},
1035 {"type":"Keyword","value":"return"},
1036 {"type":"Text","value":" "},
1037 {"type":"Name","value":"encoded"},
1038 {"type":"Punctuation","value":"[:"},
1039 {"type":"Operator","value":"-"},
1040 {"type":"LiteralNumberInteger","value":"1"},
1041 {"type":"Punctuation","value":"]"},
1042 {"type":"Text","value":" "},
1043 {"type":"Operator","value":"+"},
1044 {"type":"Text","value":" "},
1045 {"type":"LiteralStringSingle","value":"'='"},
1046 {"type":"Text","value":"\n "},
1047 {"type":"Keyword","value":"return"},
1048 {"type":"Text","value":" "},
1049 {"type":"Name","value":"encoded"},
1050 {"type":"Text","value":"\n\n\n"},
1051 {"type":"Keyword","value":"def"},
1052 {"type":"Text","value":" "},
1053 {"type":"NameFunction","value":"b32decode"},
1054 {"type":"Punctuation","value":"("},
1055 {"type":"Name","value":"s"},
1056 {"type":"Punctuation","value":","},
1057 {"type":"Text","value":" "},
1058 {"type":"Name","value":"casefold"},
1059 {"type":"Operator","value":"="},
1060 {"type":"NameBuiltinPseudo","value":"False"},
1061 {"type":"Punctuation","value":","},
1062 {"type":"Text","value":" "},
1063 {"type":"Name","value":"map01"},
1064 {"type":"Operator","value":"="},
1065 {"type":"NameBuiltinPseudo","value":"None"},
1066 {"type":"Punctuation","value":"):"},
1067 {"type":"Text","value":"\n "},
1068 {"type":"LiteralStringDouble","value":"\"\"\"Decode a Base32 encoded string.\n\n s is the string to decode. Optional casefold is a flag specifying whether\n a lowercase alphabet is acceptable as input. For security purposes, the\n default is False.\n\n RFC 3548 allows for optional mapping of the digit 0 (zero) to the letter O\n (oh), and for optional mapping of the digit 1 (one) to either the letter I\n (eye) or letter L (el). The optional argument map01 when not None,\n specifies which letter the digit 1 should be mapped to (when map01 is not\n None, the digit 0 is always mapped to the letter O). For security\n purposes the default is None, so that 0 and 1 are not allowed in the\n input.\n\n The decoded string is returned. A TypeError is raised if s were\n incorrectly padded or if there are non-alphabet characters present in the\n string.\n \"\"\""},
1069 {"type":"Text","value":"\n "},
1070 {"type":"Name","value":"quanta"},
1071 {"type":"Punctuation","value":","},
1072 {"type":"Text","value":" "},
1073 {"type":"Name","value":"leftover"},
1074 {"type":"Text","value":" "},
1075 {"type":"Operator","value":"="},
1076 {"type":"Text","value":" "},
1077 {"type":"NameBuiltin","value":"divmod"},
1078 {"type":"Punctuation","value":"("},
1079 {"type":"NameBuiltin","value":"len"},
1080 {"type":"Punctuation","value":"("},
1081 {"type":"Name","value":"s"},
1082 {"type":"Punctuation","value":"),"},
1083 {"type":"Text","value":" "},
1084 {"type":"LiteralNumberInteger","value":"8"},
1085 {"type":"Punctuation","value":")"},
1086 {"type":"Text","value":"\n "},
1087 {"type":"Keyword","value":"if"},
1088 {"type":"Text","value":" "},
1089 {"type":"Name","value":"leftover"},
1090 {"type":"Punctuation","value":":"},
1091 {"type":"Text","value":"\n "},
1092 {"type":"Keyword","value":"raise"},
1093 {"type":"Text","value":" "},
1094 {"type":"NameException","value":"TypeError"},
1095 {"type":"Punctuation","value":"("},
1096 {"type":"LiteralStringSingle","value":"'Incorrect padding'"},
1097 {"type":"Punctuation","value":")"},
1098 {"type":"Text","value":"\n "},
1099 {"type":"CommentSingle","value":"# Handle section 2.4 zero and one mapping. The flag map01 will be either"},
1100 {"type":"Text","value":"\n "},
1101 {"type":"CommentSingle","value":"# False, or the character to map the digit 1 (one) to. It should be"},
1102 {"type":"Text","value":"\n "},
1103 {"type":"CommentSingle","value":"# either L (el) or I (eye)."},
1104 {"type":"Text","value":"\n "},
1105 {"type":"Keyword","value":"if"},
1106 {"type":"Text","value":" "},
1107 {"type":"Name","value":"map01"},
1108 {"type":"Punctuation","value":":"},
1109 {"type":"Text","value":"\n "},
1110 {"type":"Name","value":"s"},
1111 {"type":"Text","value":" "},
1112 {"type":"Operator","value":"="},
1113 {"type":"Text","value":" "},
1114 {"type":"Name","value":"s"},
1115 {"type":"Operator","value":"."},
1116 {"type":"Name","value":"translate"},
1117 {"type":"Punctuation","value":"("},
1118 {"type":"Name","value":"string"},
1119 {"type":"Operator","value":"."},
1120 {"type":"Name","value":"maketrans"},
1121 {"type":"Punctuation","value":"("},
1122 {"type":"LiteralStringAffix","value":"b"},
1123 {"type":"LiteralStringSingle","value":"'01'"},
1124 {"type":"Punctuation","value":","},
1125 {"type":"Text","value":" "},
1126 {"type":"LiteralStringAffix","value":"b"},
1127 {"type":"LiteralStringSingle","value":"'O'"},
1128 {"type":"Text","value":" "},
1129 {"type":"Operator","value":"+"},
1130 {"type":"Text","value":" "},
1131 {"type":"Name","value":"map01"},
1132 {"type":"Punctuation","value":"))"},
1133 {"type":"Text","value":"\n "},
1134 {"type":"Keyword","value":"if"},
1135 {"type":"Text","value":" "},
1136 {"type":"Name","value":"casefold"},
1137 {"type":"Punctuation","value":":"},
1138 {"type":"Text","value":"\n "},
1139 {"type":"Name","value":"s"},
1140 {"type":"Text","value":" "},
1141 {"type":"Operator","value":"="},
1142 {"type":"Text","value":" "},
1143 {"type":"Name","value":"s"},
1144 {"type":"Operator","value":"."},
1145 {"type":"Name","value":"upper"},
1146 {"type":"Punctuation","value":"()"},
1147 {"type":"Text","value":"\n "},
1148 {"type":"CommentSingle","value":"# Strip off pad characters from the right. We need to count the pad"},
1149 {"type":"Text","value":"\n "},
1150 {"type":"CommentSingle","value":"# characters because this will tell us how many null bytes to remove from"},
1151 {"type":"Text","value":"\n "},
1152 {"type":"CommentSingle","value":"# the end of the decoded string."},
1153 {"type":"Text","value":"\n "},
1154 {"type":"Name","value":"padchars"},
1155 {"type":"Text","value":" "},
1156 {"type":"Operator","value":"="},
1157 {"type":"Text","value":" "},
1158 {"type":"LiteralNumberInteger","value":"0"},
1159 {"type":"Text","value":"\n "},
1160 {"type":"Name","value":"mo"},
1161 {"type":"Text","value":" "},
1162 {"type":"Operator","value":"="},
1163 {"type":"Text","value":" "},
1164 {"type":"Name","value":"re"},
1165 {"type":"Operator","value":"."},
1166 {"type":"Name","value":"search"},
1167 {"type":"Punctuation","value":"("},
1168 {"type":"LiteralStringSingle","value":"'(?P\u003cpad\u003e[=]*)$'"},
1169 {"type":"Punctuation","value":","},
1170 {"type":"Text","value":" "},
1171 {"type":"Name","value":"s"},
1172 {"type":"Punctuation","value":")"},
1173 {"type":"Text","value":"\n "},
1174 {"type":"Keyword","value":"if"},
1175 {"type":"Text","value":" "},
1176 {"type":"Name","value":"mo"},
1177 {"type":"Punctuation","value":":"},
1178 {"type":"Text","value":"\n "},
1179 {"type":"Name","value":"padchars"},
1180 {"type":"Text","value":" "},
1181 {"type":"Operator","value":"="},
1182 {"type":"Text","value":" "},
1183 {"type":"NameBuiltin","value":"len"},
1184 {"type":"Punctuation","value":"("},
1185 {"type":"Name","value":"mo"},
1186 {"type":"Operator","value":"."},
1187 {"type":"Name","value":"group"},
1188 {"type":"Punctuation","value":"("},
1189 {"type":"LiteralStringSingle","value":"'pad'"},
1190 {"type":"Punctuation","value":"))"},
1191 {"type":"Text","value":"\n "},
1192 {"type":"Keyword","value":"if"},
1193 {"type":"Text","value":" "},
1194 {"type":"Name","value":"padchars"},
1195 {"type":"Text","value":" "},
1196 {"type":"Operator","value":"\u003e"},
1197 {"type":"Text","value":" "},
1198 {"type":"LiteralNumberInteger","value":"0"},
1199 {"type":"Punctuation","value":":"},
1200 {"type":"Text","value":"\n "},
1201 {"type":"Name","value":"s"},
1202 {"type":"Text","value":" "},
1203 {"type":"Operator","value":"="},
1204 {"type":"Text","value":" "},
1205 {"type":"Name","value":"s"},
1206 {"type":"Punctuation","value":"[:"},
1207 {"type":"Operator","value":"-"},
1208 {"type":"Name","value":"padchars"},
1209 {"type":"Punctuation","value":"]"},
1210 {"type":"Text","value":"\n "},
1211 {"type":"CommentSingle","value":"# Now decode the full quanta"},
1212 {"type":"Text","value":"\n "},
1213 {"type":"Name","value":"parts"},
1214 {"type":"Text","value":" "},
1215 {"type":"Operator","value":"="},
1216 {"type":"Text","value":" "},
1217 {"type":"Punctuation","value":"[]"},
1218 {"type":"Text","value":"\n "},
1219 {"type":"Name","value":"acc"},
1220 {"type":"Text","value":" "},
1221 {"type":"Operator","value":"="},
1222 {"type":"Text","value":" "},
1223 {"type":"LiteralNumberInteger","value":"0"},
1224 {"type":"Text","value":"\n "},
1225 {"type":"Name","value":"shift"},
1226 {"type":"Text","value":" "},
1227 {"type":"Operator","value":"="},
1228 {"type":"Text","value":" "},
1229 {"type":"LiteralNumberInteger","value":"35"},
1230 {"type":"Text","value":"\n "},
1231 {"type":"Keyword","value":"for"},
1232 {"type":"Text","value":" "},
1233 {"type":"Name","value":"c"},
1234 {"type":"Text","value":" "},
1235 {"type":"OperatorWord","value":"in"},
1236 {"type":"Text","value":" "},
1237 {"type":"Name","value":"s"},
1238 {"type":"Punctuation","value":":"},
1239 {"type":"Text","value":"\n "},
1240 {"type":"Name","value":"val"},
1241 {"type":"Text","value":" "},
1242 {"type":"Operator","value":"="},
1243 {"type":"Text","value":" "},
1244 {"type":"Name","value":"_b32rev"},
1245 {"type":"Operator","value":"."},
1246 {"type":"Name","value":"get"},
1247 {"type":"Punctuation","value":"("},
1248 {"type":"Name","value":"c"},
1249 {"type":"Punctuation","value":")"},
1250 {"type":"Text","value":"\n "},
1251 {"type":"Keyword","value":"if"},
1252 {"type":"Text","value":" "},
1253 {"type":"Name","value":"val"},
1254 {"type":"Text","value":" "},
1255 {"type":"OperatorWord","value":"is"},
1256 {"type":"Text","value":" "},
1257 {"type":"NameBuiltinPseudo","value":"None"},
1258 {"type":"Punctuation","value":":"},
1259 {"type":"Text","value":"\n "},
1260 {"type":"Keyword","value":"raise"},
1261 {"type":"Text","value":" "},
1262 {"type":"NameException","value":"TypeError"},
1263 {"type":"Punctuation","value":"("},
1264 {"type":"LiteralStringSingle","value":"'Non-base32 digit found'"},
1265 {"type":"Punctuation","value":")"},
1266 {"type":"Text","value":"\n "},
1267 {"type":"Name","value":"acc"},
1268 {"type":"Text","value":" "},
1269 {"type":"Operator","value":"+="},
1270 {"type":"Text","value":" "},
1271 {"type":"Name","value":"_b32rev"},
1272 {"type":"Punctuation","value":"["},
1273 {"type":"Name","value":"c"},
1274 {"type":"Punctuation","value":"]"},
1275 {"type":"Text","value":" "},
1276 {"type":"Operator","value":"\u003c\u003c"},
1277 {"type":"Text","value":" "},
1278 {"type":"Name","value":"shift"},
1279 {"type":"Text","value":"\n "},
1280 {"type":"Name","value":"shift"},
1281 {"type":"Text","value":" "},
1282 {"type":"Operator","value":"-="},
1283 {"type":"Text","value":" "},
1284 {"type":"LiteralNumberInteger","value":"5"},
1285 {"type":"Text","value":"\n "},
1286 {"type":"Keyword","value":"if"},
1287 {"type":"Text","value":" "},
1288 {"type":"Name","value":"shift"},
1289 {"type":"Text","value":" "},
1290 {"type":"Operator","value":"\u003c"},
1291 {"type":"Text","value":" "},
1292 {"type":"LiteralNumberInteger","value":"0"},
1293 {"type":"Punctuation","value":":"},
1294 {"type":"Text","value":"\n "},
1295 {"type":"Name","value":"parts"},
1296 {"type":"Operator","value":"."},
1297 {"type":"Name","value":"append"},
1298 {"type":"Punctuation","value":"("},
1299 {"type":"Name","value":"binascii"},
1300 {"type":"Operator","value":"."},
1301 {"type":"Name","value":"unhexlify"},
1302 {"type":"Punctuation","value":"("},
1303 {"type":"LiteralStringSingle","value":"'"},
1304 {"type":"LiteralStringInterpol","value":"%010x"},
1305 {"type":"LiteralStringSingle","value":"'"},
1306 {"type":"Text","value":" "},
1307 {"type":"Operator","value":"%"},
1308 {"type":"Text","value":" "},
1309 {"type":"Name","value":"acc"},
1310 {"type":"Punctuation","value":"))"},
1311 {"type":"Text","value":"\n "},
1312 {"type":"Name","value":"acc"},
1313 {"type":"Text","value":" "},
1314 {"type":"Operator","value":"="},
1315 {"type":"Text","value":" "},
1316 {"type":"LiteralNumberInteger","value":"0"},
1317 {"type":"Text","value":"\n "},
1318 {"type":"Name","value":"shift"},
1319 {"type":"Text","value":" "},
1320 {"type":"Operator","value":"="},
1321 {"type":"Text","value":" "},
1322 {"type":"LiteralNumberInteger","value":"35"},
1323 {"type":"Text","value":"\n "},
1324 {"type":"CommentSingle","value":"# Process the last, partial quanta"},
1325 {"type":"Text","value":"\n "},
1326 {"type":"Name","value":"last"},
1327 {"type":"Text","value":" "},
1328 {"type":"Operator","value":"="},
1329 {"type":"Text","value":" "},
1330 {"type":"Name","value":"binascii"},
1331 {"type":"Operator","value":"."},
1332 {"type":"Name","value":"unhexlify"},
1333 {"type":"Punctuation","value":"("},
1334 {"type":"LiteralStringSingle","value":"'"},
1335 {"type":"LiteralStringInterpol","value":"%010x"},
1336 {"type":"LiteralStringSingle","value":"'"},
1337 {"type":"Text","value":" "},
1338 {"type":"Operator","value":"%"},
1339 {"type":"Text","value":" "},
1340 {"type":"Name","value":"acc"},
1341 {"type":"Punctuation","value":")"},
1342 {"type":"Text","value":"\n "},
1343 {"type":"Keyword","value":"if"},
1344 {"type":"Text","value":" "},
1345 {"type":"Name","value":"padchars"},
1346 {"type":"Text","value":" "},
1347 {"type":"Operator","value":"=="},
1348 {"type":"Text","value":" "},
1349 {"type":"LiteralNumberInteger","value":"0"},
1350 {"type":"Punctuation","value":":"},
1351 {"type":"Text","value":"\n "},
1352 {"type":"Name","value":"last"},
1353 {"type":"Text","value":" "},
1354 {"type":"Operator","value":"="},
1355 {"type":"Text","value":" "},
1356 {"type":"LiteralStringSingle","value":"''"},
1357 {"type":"Text","value":" "},
1358 {"type":"CommentSingle","value":"# No characters"},
1359 {"type":"Text","value":"\n "},
1360 {"type":"Keyword","value":"elif"},
1361 {"type":"Text","value":" "},
1362 {"type":"Name","value":"padchars"},
1363 {"type":"Text","value":" "},
1364 {"type":"Operator","value":"=="},
1365 {"type":"Text","value":" "},
1366 {"type":"LiteralNumberInteger","value":"1"},
1367 {"type":"Punctuation","value":":"},
1368 {"type":"Text","value":"\n "},
1369 {"type":"Name","value":"last"},
1370 {"type":"Text","value":" "},
1371 {"type":"Operator","value":"="},
1372 {"type":"Text","value":" "},
1373 {"type":"Name","value":"last"},
1374 {"type":"Punctuation","value":"[:"},
1375 {"type":"Operator","value":"-"},
1376 {"type":"LiteralNumberInteger","value":"1"},
1377 {"type":"Punctuation","value":"]"},
1378 {"type":"Text","value":"\n "},
1379 {"type":"Keyword","value":"elif"},
1380 {"type":"Text","value":" "},
1381 {"type":"Name","value":"padchars"},
1382 {"type":"Text","value":" "},
1383 {"type":"Operator","value":"=="},
1384 {"type":"Text","value":" "},
1385 {"type":"LiteralNumberInteger","value":"3"},
1386 {"type":"Punctuation","value":":"},
1387 {"type":"Text","value":"\n "},
1388 {"type":"Name","value":"last"},
1389 {"type":"Text","value":" "},
1390 {"type":"Operator","value":"="},
1391 {"type":"Text","value":" "},
1392 {"type":"Name","value":"last"},
1393 {"type":"Punctuation","value":"[:"},
1394 {"type":"Operator","value":"-"},
1395 {"type":"LiteralNumberInteger","value":"2"},
1396 {"type":"Punctuation","value":"]"},
1397 {"type":"Text","value":"\n "},
1398 {"type":"Keyword","value":"elif"},
1399 {"type":"Text","value":" "},
1400 {"type":"Name","value":"padchars"},
1401 {"type":"Text","value":" "},
1402 {"type":"Operator","value":"=="},
1403 {"type":"Text","value":" "},
1404 {"type":"LiteralNumberInteger","value":"4"},
1405 {"type":"Punctuation","value":":"},
1406 {"type":"Text","value":"\n "},
1407 {"type":"Name","value":"last"},
1408 {"type":"Text","value":" "},
1409 {"type":"Operator","value":"="},
1410 {"type":"Text","value":" "},
1411 {"type":"Name","value":"last"},
1412 {"type":"Punctuation","value":"[:"},
1413 {"type":"Operator","value":"-"},
1414 {"type":"LiteralNumberInteger","value":"3"},
1415 {"type":"Punctuation","value":"]"},
1416 {"type":"Text","value":"\n "},
1417 {"type":"Keyword","value":"elif"},
1418 {"type":"Text","value":" "},
1419 {"type":"Name","value":"padchars"},
1420 {"type":"Text","value":" "},
1421 {"type":"Operator","value":"=="},
1422 {"type":"Text","value":" "},
1423 {"type":"LiteralNumberInteger","value":"6"},
1424 {"type":"Punctuation","value":":"},
1425 {"type":"Text","value":"\n "},
1426 {"type":"Name","value":"last"},
1427 {"type":"Text","value":" "},
1428 {"type":"Operator","value":"="},
1429 {"type":"Text","value":" "},
1430 {"type":"Name","value":"last"},
1431 {"type":"Punctuation","value":"[:"},
1432 {"type":"Operator","value":"-"},
1433 {"type":"LiteralNumberInteger","value":"4"},
1434 {"type":"Punctuation","value":"]"},
1435 {"type":"Text","value":"\n "},
1436 {"type":"Keyword","value":"else"},
1437 {"type":"Punctuation","value":":"},
1438 {"type":"Text","value":"\n "},
1439 {"type":"Keyword","value":"raise"},
1440 {"type":"Text","value":" "},
1441 {"type":"NameException","value":"TypeError"},
1442 {"type":"Punctuation","value":"("},
1443 {"type":"LiteralStringSingle","value":"'Incorrect padding'"},
1444 {"type":"Punctuation","value":")"},
1445 {"type":"Text","value":"\n "},
1446 {"type":"Name","value":"parts"},
1447 {"type":"Operator","value":"."},
1448 {"type":"Name","value":"append"},
1449 {"type":"Punctuation","value":"("},
1450 {"type":"Name","value":"last"},
1451 {"type":"Punctuation","value":")"},
1452 {"type":"Text","value":"\n "},
1453 {"type":"Keyword","value":"return"},
1454 {"type":"Text","value":" "},
1455 {"type":"Name","value":"EMPTYSTRING"},
1456 {"type":"Operator","value":"."},
1457 {"type":"Name","value":"join"},
1458 {"type":"Punctuation","value":"("},
1459 {"type":"Name","value":"parts"},
1460 {"type":"Punctuation","value":")"},
1461 {"type":"Text","value":"\n\n\n\u000c\n"},
1462 {"type":"CommentSingle","value":"# RFC 3548, Base 16 Alphabet specifies uppercase, but hexlify() returns"},
1463 {"type":"Text","value":"\n"},
1464 {"type":"CommentSingle","value":"# lowercase. The RFC also recommends against accepting input case"},
1465 {"type":"Text","value":"\n"},
1466 {"type":"CommentSingle","value":"# insensitively."},
1467 {"type":"Text","value":"\n"},
1468 {"type":"Keyword","value":"def"},
1469 {"type":"Text","value":" "},
1470 {"type":"NameFunction","value":"b16encode"},
1471 {"type":"Punctuation","value":"("},
1472 {"type":"Name","value":"s"},
1473 {"type":"Punctuation","value":"):"},
1474 {"type":"Text","value":"\n "},
1475 {"type":"LiteralStringDouble","value":"\"\"\"Encode a string using Base16.\n\n s is the string to encode. The encoded string is returned.\n \"\"\""},
1476 {"type":"Text","value":"\n "},
1477 {"type":"Keyword","value":"return"},
1478 {"type":"Text","value":" "},
1479 {"type":"Name","value":"binascii"},
1480 {"type":"Operator","value":"."},
1481 {"type":"Name","value":"hexlify"},
1482 {"type":"Punctuation","value":"("},
1483 {"type":"Name","value":"s"},
1484 {"type":"Punctuation","value":")"},
1485 {"type":"Operator","value":"."},
1486 {"type":"Name","value":"upper"},
1487 {"type":"Punctuation","value":"()"},
1488 {"type":"Text","value":"\n\n\n"},
1489 {"type":"Keyword","value":"def"},
1490 {"type":"Text","value":" "},
1491 {"type":"NameFunction","value":"b16decode"},
1492 {"type":"Punctuation","value":"("},
1493 {"type":"Name","value":"s"},
1494 {"type":"Punctuation","value":","},
1495 {"type":"Text","value":" "},
1496 {"type":"Name","value":"casefold"},
1497 {"type":"Operator","value":"="},
1498 {"type":"NameBuiltinPseudo","value":"False"},
1499 {"type":"Punctuation","value":"):"},
1500 {"type":"Text","value":"\n "},
1501 {"type":"LiteralStringDouble","value":"\"\"\"Decode a Base16 encoded string.\n\n s is the string to decode. Optional casefold is a flag specifying whether\n a lowercase alphabet is acceptable as input. For security purposes, the\n default is False.\n\n The decoded string is returned. A TypeError is raised if s is\n incorrectly padded or if there are non-alphabet characters present in the\n string.\n \"\"\""},
1502 {"type":"Text","value":"\n "},
1503 {"type":"Keyword","value":"if"},
1504 {"type":"Text","value":" "},
1505 {"type":"Name","value":"casefold"},
1506 {"type":"Punctuation","value":":"},
1507 {"type":"Text","value":"\n "},
1508 {"type":"Name","value":"s"},
1509 {"type":"Text","value":" "},
1510 {"type":"Operator","value":"="},
1511 {"type":"Text","value":" "},
1512 {"type":"Name","value":"s"},
1513 {"type":"Operator","value":"."},
1514 {"type":"Name","value":"upper"},
1515 {"type":"Punctuation","value":"()"},
1516 {"type":"Text","value":"\n "},
1517 {"type":"Keyword","value":"if"},
1518 {"type":"Text","value":" "},
1519 {"type":"Name","value":"re"},
1520 {"type":"Operator","value":"."},
1521 {"type":"Name","value":"search"},
1522 {"type":"Punctuation","value":"("},
1523 {"type":"LiteralStringSingle","value":"'[^0-9A-F]'"},
1524 {"type":"Punctuation","value":","},
1525 {"type":"Text","value":" "},
1526 {"type":"Name","value":"s"},
1527 {"type":"Punctuation","value":"):"},
1528 {"type":"Text","value":"\n "},
1529 {"type":"Keyword","value":"raise"},
1530 {"type":"Text","value":" "},
1531 {"type":"NameException","value":"TypeError"},
1532 {"type":"Punctuation","value":"("},
1533 {"type":"LiteralStringSingle","value":"'Non-base16 digit found'"},
1534 {"type":"Punctuation","value":")"},
1535 {"type":"Text","value":"\n "},
1536 {"type":"Keyword","value":"return"},
1537 {"type":"Text","value":" "},
1538 {"type":"Name","value":"binascii"},
1539 {"type":"Operator","value":"."},
1540 {"type":"Name","value":"unhexlify"},
1541 {"type":"Punctuation","value":"("},
1542 {"type":"Name","value":"s"},
1543 {"type":"Punctuation","value":")"},
1544 {"type":"Text","value":"\n\n\n\u000c\n"},
1545 {"type":"CommentSingle","value":"# Legacy interface. This code could be cleaned up since I don't believe"},
1546 {"type":"Text","value":"\n"},
1547 {"type":"CommentSingle","value":"# binascii has any line length limitations. It just doesn't seem worth it"},
1548 {"type":"Text","value":"\n"},
1549 {"type":"CommentSingle","value":"# though."},
1550 {"type":"Text","value":"\n\n"},
1551 {"type":"Name","value":"MAXLINESIZE"},
1552 {"type":"Text","value":" "},
1553 {"type":"Operator","value":"="},
1554 {"type":"Text","value":" "},
1555 {"type":"LiteralNumberInteger","value":"76"},
1556 {"type":"Text","value":" "},
1557 {"type":"CommentSingle","value":"# Excluding the CRLF"},
1558 {"type":"Text","value":"\n"},
1559 {"type":"Name","value":"MAXBINSIZE"},
1560 {"type":"Text","value":" "},
1561 {"type":"Operator","value":"="},
1562 {"type":"Text","value":" "},
1563 {"type":"Punctuation","value":"("},
1564 {"type":"Name","value":"MAXLINESIZE"},
1565 {"type":"Operator","value":"//"},
1566 {"type":"LiteralNumberInteger","value":"4"},
1567 {"type":"Punctuation","value":")"},
1568 {"type":"Operator","value":"*"},
1569 {"type":"LiteralNumberInteger","value":"3"},
1570 {"type":"Text","value":"\n\n"},
1571 {"type":"Keyword","value":"def"},
1572 {"type":"Text","value":" "},
1573 {"type":"NameFunction","value":"encode"},
1574 {"type":"Punctuation","value":"("},
1575 {"type":"NameBuiltin","value":"input"},
1576 {"type":"Punctuation","value":","},
1577 {"type":"Text","value":" "},
1578 {"type":"Name","value":"output"},
1579 {"type":"Punctuation","value":"):"},
1580 {"type":"Text","value":"\n "},
1581 {"type":"LiteralStringDouble","value":"\"\"\"Encode a file.\"\"\""},
1582 {"type":"Text","value":"\n "},
1583 {"type":"Keyword","value":"while"},
1584 {"type":"Text","value":" "},
1585 {"type":"NameBuiltinPseudo","value":"True"},
1586 {"type":"Punctuation","value":":"},
1587 {"type":"Text","value":"\n "},
1588 {"type":"Name","value":"s"},
1589 {"type":"Text","value":" "},
1590 {"type":"Operator","value":"="},
1591 {"type":"Text","value":" "},
1592 {"type":"NameBuiltin","value":"input"},
1593 {"type":"Operator","value":"."},
1594 {"type":"Name","value":"read"},
1595 {"type":"Punctuation","value":"("},
1596 {"type":"Name","value":"MAXBINSIZE"},
1597 {"type":"Punctuation","value":")"},
1598 {"type":"Text","value":"\n "},
1599 {"type":"Keyword","value":"if"},
1600 {"type":"Text","value":" "},
1601 {"type":"OperatorWord","value":"not"},
1602 {"type":"Text","value":" "},
1603 {"type":"Name","value":"s"},
1604 {"type":"Punctuation","value":":"},
1605 {"type":"Text","value":"\n "},
1606 {"type":"Keyword","value":"break"},
1607 {"type":"Text","value":"\n "},
1608 {"type":"Keyword","value":"while"},
1609 {"type":"Text","value":" "},
1610 {"type":"NameBuiltin","value":"len"},
1611 {"type":"Punctuation","value":"("},
1612 {"type":"Name","value":"s"},
1613 {"type":"Punctuation","value":")"},
1614 {"type":"Text","value":" "},
1615 {"type":"Operator","value":"\u003c"},
1616 {"type":"Text","value":" "},
1617 {"type":"Name","value":"MAXBINSIZE"},
1618 {"type":"Punctuation","value":":"},
1619 {"type":"Text","value":"\n "},
1620 {"type":"Name","value":"ns"},
1621 {"type":"Text","value":" "},
1622 {"type":"Operator","value":"="},
1623 {"type":"Text","value":" "},
1624 {"type":"NameBuiltin","value":"input"},
1625 {"type":"Operator","value":"."},
1626 {"type":"Name","value":"read"},
1627 {"type":"Punctuation","value":"("},
1628 {"type":"Name","value":"MAXBINSIZE"},
1629 {"type":"Operator","value":"-"},
1630 {"type":"NameBuiltin","value":"len"},
1631 {"type":"Punctuation","value":"("},
1632 {"type":"Name","value":"s"},
1633 {"type":"Punctuation","value":"))"},
1634 {"type":"Text","value":"\n "},
1635 {"type":"Keyword","value":"if"},
1636 {"type":"Text","value":" "},
1637 {"type":"OperatorWord","value":"not"},
1638 {"type":"Text","value":" "},
1639 {"type":"Name","value":"ns"},
1640 {"type":"Punctuation","value":":"},
1641 {"type":"Text","value":"\n "},
1642 {"type":"Keyword","value":"break"},
1643 {"type":"Text","value":"\n "},
1644 {"type":"Name","value":"s"},
1645 {"type":"Text","value":" "},
1646 {"type":"Operator","value":"+="},
1647 {"type":"Text","value":" "},
1648 {"type":"Name","value":"ns"},
1649 {"type":"Text","value":"\n "},
1650 {"type":"Name","value":"line"},
1651 {"type":"Text","value":" "},
1652 {"type":"Operator","value":"="},
1653 {"type":"Text","value":" "},
1654 {"type":"Name","value":"binascii"},
1655 {"type":"Operator","value":"."},
1656 {"type":"Name","value":"b2a_base64"},
1657 {"type":"Punctuation","value":"("},
1658 {"type":"Name","value":"s"},
1659 {"type":"Punctuation","value":")"},
1660 {"type":"Text","value":"\n "},
1661 {"type":"Name","value":"output"},
1662 {"type":"Operator","value":"."},
1663 {"type":"Name","value":"write"},
1664 {"type":"Punctuation","value":"("},
1665 {"type":"Name","value":"line"},
1666 {"type":"Punctuation","value":")"},
1667 {"type":"Text","value":"\n\n\n"},
1668 {"type":"Keyword","value":"def"},
1669 {"type":"Text","value":" "},
1670 {"type":"NameFunction","value":"decode"},
1671 {"type":"Punctuation","value":"("},
1672 {"type":"NameBuiltin","value":"input"},
1673 {"type":"Punctuation","value":","},
1674 {"type":"Text","value":" "},
1675 {"type":"Name","value":"output"},
1676 {"type":"Punctuation","value":"):"},
1677 {"type":"Text","value":"\n "},
1678 {"type":"LiteralStringDouble","value":"\"\"\"Decode a file.\"\"\""},
1679 {"type":"Text","value":"\n "},
1680 {"type":"Keyword","value":"while"},
1681 {"type":"Text","value":" "},
1682 {"type":"NameBuiltinPseudo","value":"True"},
1683 {"type":"Punctuation","value":":"},
1684 {"type":"Text","value":"\n "},
1685 {"type":"Name","value":"line"},
1686 {"type":"Text","value":" "},
1687 {"type":"Operator","value":"="},
1688 {"type":"Text","value":" "},
1689 {"type":"NameBuiltin","value":"input"},
1690 {"type":"Operator","value":"."},
1691 {"type":"Name","value":"readline"},
1692 {"type":"Punctuation","value":"()"},
1693 {"type":"Text","value":"\n "},
1694 {"type":"Keyword","value":"if"},
1695 {"type":"Text","value":" "},
1696 {"type":"OperatorWord","value":"not"},
1697 {"type":"Text","value":" "},
1698 {"type":"Name","value":"line"},
1699 {"type":"Punctuation","value":":"},
1700 {"type":"Text","value":"\n "},
1701 {"type":"Keyword","value":"break"},
1702 {"type":"Text","value":"\n "},
1703 {"type":"Name","value":"s"},
1704 {"type":"Text","value":" "},
1705 {"type":"Operator","value":"="},
1706 {"type":"Text","value":" "},
1707 {"type":"Name","value":"binascii"},
1708 {"type":"Operator","value":"."},
1709 {"type":"Name","value":"a2b_base64"},
1710 {"type":"Punctuation","value":"("},
1711 {"type":"Name","value":"line"},
1712 {"type":"Punctuation","value":")"},
1713 {"type":"Text","value":"\n "},
1714 {"type":"Name","value":"output"},
1715 {"type":"Operator","value":"."},
1716 {"type":"Name","value":"write"},
1717 {"type":"Punctuation","value":"("},
1718 {"type":"Name","value":"s"},
1719 {"type":"Punctuation","value":")"},
1720 {"type":"Text","value":"\n\n\n"},
1721 {"type":"Keyword","value":"def"},
1722 {"type":"Text","value":" "},
1723 {"type":"NameFunction","value":"encodestring"},
1724 {"type":"Punctuation","value":"("},
1725 {"type":"Name","value":"s"},
1726 {"type":"Punctuation","value":"):"},
1727 {"type":"Text","value":"\n "},
1728 {"type":"LiteralStringDouble","value":"\"\"\"Encode a string into multiple lines of base-64 data.\"\"\""},
1729 {"type":"Text","value":"\n "},
1730 {"type":"Name","value":"pieces"},
1731 {"type":"Text","value":" "},
1732 {"type":"Operator","value":"="},
1733 {"type":"Text","value":" "},
1734 {"type":"Punctuation","value":"[]"},
1735 {"type":"Text","value":"\n "},
1736 {"type":"Keyword","value":"for"},
1737 {"type":"Text","value":" "},
1738 {"type":"Name","value":"i"},
1739 {"type":"Text","value":" "},
1740 {"type":"OperatorWord","value":"in"},
1741 {"type":"Text","value":" "},
1742 {"type":"NameBuiltin","value":"range"},
1743 {"type":"Punctuation","value":"("},
1744 {"type":"LiteralNumberInteger","value":"0"},
1745 {"type":"Punctuation","value":","},
1746 {"type":"Text","value":" "},
1747 {"type":"NameBuiltin","value":"len"},
1748 {"type":"Punctuation","value":"("},
1749 {"type":"Name","value":"s"},
1750 {"type":"Punctuation","value":"),"},
1751 {"type":"Text","value":" "},
1752 {"type":"Name","value":"MAXBINSIZE"},
1753 {"type":"Punctuation","value":"):"},
1754 {"type":"Text","value":"\n "},
1755 {"type":"Name","value":"chunk"},
1756 {"type":"Text","value":" "},
1757 {"type":"Operator","value":"="},
1758 {"type":"Text","value":" "},
1759 {"type":"Name","value":"s"},
1760 {"type":"Punctuation","value":"["},
1761 {"type":"Name","value":"i"},
1762 {"type":"Text","value":" "},
1763 {"type":"Punctuation","value":":"},
1764 {"type":"Text","value":" "},
1765 {"type":"Name","value":"i"},
1766 {"type":"Text","value":" "},
1767 {"type":"Operator","value":"+"},
1768 {"type":"Text","value":" "},
1769 {"type":"Name","value":"MAXBINSIZE"},
1770 {"type":"Punctuation","value":"]"},
1771 {"type":"Text","value":"\n "},
1772 {"type":"Name","value":"pieces"},
1773 {"type":"Operator","value":"."},
1774 {"type":"Name","value":"append"},
1775 {"type":"Punctuation","value":"("},
1776 {"type":"Name","value":"binascii"},
1777 {"type":"Operator","value":"."},
1778 {"type":"Name","value":"b2a_base64"},
1779 {"type":"Punctuation","value":"("},
1780 {"type":"Name","value":"chunk"},
1781 {"type":"Punctuation","value":"))"},
1782 {"type":"Text","value":"\n "},
1783 {"type":"Keyword","value":"return"},
1784 {"type":"Text","value":" "},
1785 {"type":"LiteralStringDouble","value":"\"\""},
1786 {"type":"Operator","value":"."},
1787 {"type":"Name","value":"join"},
1788 {"type":"Punctuation","value":"("},
1789 {"type":"Name","value":"pieces"},
1790 {"type":"Punctuation","value":")"},
1791 {"type":"Text","value":"\n\n\n"},
1792 {"type":"Keyword","value":"def"},
1793 {"type":"Text","value":" "},
1794 {"type":"NameFunction","value":"decodestring"},
1795 {"type":"Punctuation","value":"("},
1796 {"type":"Name","value":"s"},
1797 {"type":"Punctuation","value":"):"},
1798 {"type":"Text","value":"\n "},
1799 {"type":"LiteralStringDouble","value":"\"\"\"Decode a string.\"\"\""},
1800 {"type":"Text","value":"\n "},
1801 {"type":"Keyword","value":"return"},
1802 {"type":"Text","value":" "},
1803 {"type":"Name","value":"binascii"},
1804 {"type":"Operator","value":"."},
1805 {"type":"Name","value":"a2b_base64"},
1806 {"type":"Punctuation","value":"("},
1807 {"type":"Name","value":"s"},
1808 {"type":"Punctuation","value":")"},
1809 {"type":"Text","value":"\n\n\n\u000c\n"},
1810 {"type":"CommentSingle","value":"# Useable as a script..."},
1811 {"type":"Text","value":"\n"},
1812 {"type":"Keyword","value":"def"},
1813 {"type":"Text","value":" "},
1814 {"type":"NameFunction","value":"test"},
1815 {"type":"Punctuation","value":"():"},
1816 {"type":"Text","value":"\n "},
1817 {"type":"LiteralStringDouble","value":"\"\"\"Small test program\"\"\""},
1818 {"type":"Text","value":"\n "},
1819 {"type":"KeywordNamespace","value":"import"},
1820 {"type":"Text","value":" "},
1821 {"type":"NameNamespace","value":"sys"},
1822 {"type":"Operator","value":","},
1823 {"type":"Text","value":" "},
1824 {"type":"NameNamespace","value":"getopt"},
1825 {"type":"Text","value":"\n "},
1826 {"type":"Keyword","value":"try"},
1827 {"type":"Punctuation","value":":"},
1828 {"type":"Text","value":"\n "},
1829 {"type":"Name","value":"opts"},
1830 {"type":"Punctuation","value":","},
1831 {"type":"Text","value":" "},
1832 {"type":"Name","value":"args"},
1833 {"type":"Text","value":" "},
1834 {"type":"Operator","value":"="},
1835 {"type":"Text","value":" "},
1836 {"type":"Name","value":"getopt"},
1837 {"type":"Operator","value":"."},
1838 {"type":"Name","value":"getopt"},
1839 {"type":"Punctuation","value":"("},
1840 {"type":"Name","value":"sys"},
1841 {"type":"Operator","value":"."},
1842 {"type":"Name","value":"argv"},
1843 {"type":"Punctuation","value":"["},
1844 {"type":"LiteralNumberInteger","value":"1"},
1845 {"type":"Punctuation","value":":],"},
1846 {"type":"Text","value":" "},
1847 {"type":"LiteralStringSingle","value":"'deut'"},
1848 {"type":"Punctuation","value":")"},
1849 {"type":"Text","value":"\n "},
1850 {"type":"Keyword","value":"except"},
1851 {"type":"Text","value":" "},
1852 {"type":"Name","value":"getopt"},
1853 {"type":"Operator","value":"."},
1854 {"type":"Name","value":"error"},
1855 {"type":"Punctuation","value":","},
1856 {"type":"Text","value":" "},
1857 {"type":"Name","value":"msg"},
1858 {"type":"Punctuation","value":":"},
1859 {"type":"Text","value":"\n "},
1860 {"type":"Name","value":"sys"},
1861 {"type":"Operator","value":"."},
1862 {"type":"Name","value":"stdout"},
1863 {"type":"Text","value":" "},
1864 {"type":"Operator","value":"="},
1865 {"type":"Text","value":" "},
1866 {"type":"Name","value":"sys"},
1867 {"type":"Operator","value":"."},
1868 {"type":"Name","value":"stderr"},
1869 {"type":"Text","value":"\n "},
1870 {"type":"Keyword","value":"print"},
1871 {"type":"Text","value":" "},
1872 {"type":"Name","value":"msg"},
1873 {"type":"Text","value":"\n "},
1874 {"type":"Keyword","value":"print"},
1875 {"type":"Text","value":" "},
1876 {"type":"LiteralStringDouble","value":"\"\"\"usage: "},
1877 {"type":"LiteralStringInterpol","value":"%s"},
1878 {"type":"LiteralStringDouble","value":" [-d|-e|-u|-t] [file|-]\n -d, -u: decode\n -e: encode (default)\n -t: encode and decode string 'Aladdin:open sesame'\"\"\""},
1879 {"type":"Operator","value":"%"},
1880 {"type":"Name","value":"sys"},
1881 {"type":"Operator","value":"."},
1882 {"type":"Name","value":"argv"},
1883 {"type":"Punctuation","value":"["},
1884 {"type":"LiteralNumberInteger","value":"0"},
1885 {"type":"Punctuation","value":"]"},
1886 {"type":"Text","value":"\n "},
1887 {"type":"Name","value":"sys"},
1888 {"type":"Operator","value":"."},
1889 {"type":"Name","value":"exit"},
1890 {"type":"Punctuation","value":"("},
1891 {"type":"LiteralNumberInteger","value":"2"},
1892 {"type":"Punctuation","value":")"},
1893 {"type":"Text","value":"\n "},
1894 {"type":"Name","value":"func"},
1895 {"type":"Text","value":" "},
1896 {"type":"Operator","value":"="},
1897 {"type":"Text","value":" "},
1898 {"type":"Name","value":"encode"},
1899 {"type":"Text","value":"\n "},
1900 {"type":"Keyword","value":"for"},
1901 {"type":"Text","value":" "},
1902 {"type":"Name","value":"o"},
1903 {"type":"Punctuation","value":","},
1904 {"type":"Text","value":" "},
1905 {"type":"Name","value":"a"},
1906 {"type":"Text","value":" "},
1907 {"type":"OperatorWord","value":"in"},
1908 {"type":"Text","value":" "},
1909 {"type":"Name","value":"opts"},
1910 {"type":"Punctuation","value":":"},
1911 {"type":"Text","value":"\n "},
1912 {"type":"Keyword","value":"if"},
1913 {"type":"Text","value":" "},
1914 {"type":"Name","value":"o"},
1915 {"type":"Text","value":" "},
1916 {"type":"Operator","value":"=="},
1917 {"type":"Text","value":" "},
1918 {"type":"LiteralStringSingle","value":"'-e'"},
1919 {"type":"Punctuation","value":":"},
1920 {"type":"Text","value":" "},
1921 {"type":"Name","value":"func"},
1922 {"type":"Text","value":" "},
1923 {"type":"Operator","value":"="},
1924 {"type":"Text","value":" "},
1925 {"type":"Name","value":"encode"},
1926 {"type":"Text","value":"\n "},
1927 {"type":"Keyword","value":"if"},
1928 {"type":"Text","value":" "},
1929 {"type":"Name","value":"o"},
1930 {"type":"Text","value":" "},
1931 {"type":"Operator","value":"=="},
1932 {"type":"Text","value":" "},
1933 {"type":"LiteralStringSingle","value":"'-d'"},
1934 {"type":"Punctuation","value":":"},
1935 {"type":"Text","value":" "},
1936 {"type":"Name","value":"func"},
1937 {"type":"Text","value":" "},
1938 {"type":"Operator","value":"="},
1939 {"type":"Text","value":" "},
1940 {"type":"Name","value":"decode"},
1941 {"type":"Text","value":"\n "},
1942 {"type":"Keyword","value":"if"},
1943 {"type":"Text","value":" "},
1944 {"type":"Name","value":"o"},
1945 {"type":"Text","value":" "},
1946 {"type":"Operator","value":"=="},
1947 {"type":"Text","value":" "},
1948 {"type":"LiteralStringSingle","value":"'-u'"},
1949 {"type":"Punctuation","value":":"},
1950 {"type":"Text","value":" "},
1951 {"type":"Name","value":"func"},
1952 {"type":"Text","value":" "},
1953 {"type":"Operator","value":"="},
1954 {"type":"Text","value":" "},
1955 {"type":"Name","value":"decode"},
1956 {"type":"Text","value":"\n "},
1957 {"type":"Keyword","value":"if"},
1958 {"type":"Text","value":" "},
1959 {"type":"Name","value":"o"},
1960 {"type":"Text","value":" "},
1961 {"type":"Operator","value":"=="},
1962 {"type":"Text","value":" "},
1963 {"type":"LiteralStringSingle","value":"'-t'"},
1964 {"type":"Punctuation","value":":"},
1965 {"type":"Text","value":" "},
1966 {"type":"Name","value":"test1"},
1967 {"type":"Punctuation","value":"();"},
1968 {"type":"Text","value":" "},
1969 {"type":"Keyword","value":"return"},
1970 {"type":"Text","value":"\n "},
1971 {"type":"Keyword","value":"if"},
1972 {"type":"Text","value":" "},
1973 {"type":"Name","value":"args"},
1974 {"type":"Text","value":" "},
1975 {"type":"OperatorWord","value":"and"},
1976 {"type":"Text","value":" "},
1977 {"type":"Name","value":"args"},
1978 {"type":"Punctuation","value":"["},
1979 {"type":"LiteralNumberInteger","value":"0"},
1980 {"type":"Punctuation","value":"]"},
1981 {"type":"Text","value":" "},
1982 {"type":"Operator","value":"!="},
1983 {"type":"Text","value":" "},
1984 {"type":"LiteralStringSingle","value":"'-'"},
1985 {"type":"Punctuation","value":":"},
1986 {"type":"Text","value":"\n "},
1987 {"type":"Keyword","value":"with"},
1988 {"type":"Text","value":" "},
1989 {"type":"NameBuiltin","value":"open"},
1990 {"type":"Punctuation","value":"("},
1991 {"type":"Name","value":"args"},
1992 {"type":"Punctuation","value":"["},
1993 {"type":"LiteralNumberInteger","value":"0"},
1994 {"type":"Punctuation","value":"],"},
1995 {"type":"Text","value":" "},
1996 {"type":"LiteralStringSingle","value":"'rb'"},
1997 {"type":"Punctuation","value":")"},
1998 {"type":"Text","value":" "},
1999 {"type":"Keyword","value":"as"},
2000 {"type":"Text","value":" "},
2001 {"type":"Name","value":"f"},
2002 {"type":"Punctuation","value":":"},
2003 {"type":"Text","value":"\n "},
2004 {"type":"Name","value":"func"},
2005 {"type":"Punctuation","value":"("},
2006 {"type":"Name","value":"f"},
2007 {"type":"Punctuation","value":","},
2008 {"type":"Text","value":" "},
2009 {"type":"Name","value":"sys"},
2010 {"type":"Operator","value":"."},
2011 {"type":"Name","value":"stdout"},
2012 {"type":"Punctuation","value":")"},
2013 {"type":"Text","value":"\n "},
2014 {"type":"Keyword","value":"else"},
2015 {"type":"Punctuation","value":":"},
2016 {"type":"Text","value":"\n "},
2017 {"type":"Name","value":"func"},
2018 {"type":"Punctuation","value":"("},
2019 {"type":"Name","value":"sys"},
2020 {"type":"Operator","value":"."},
2021 {"type":"Name","value":"stdin"},
2022 {"type":"Punctuation","value":","},
2023 {"type":"Text","value":" "},
2024 {"type":"Name","value":"sys"},
2025 {"type":"Operator","value":"."},
2026 {"type":"Name","value":"stdout"},
2027 {"type":"Punctuation","value":")"},
2028 {"type":"Text","value":"\n\n\n"},
2029 {"type":"Keyword","value":"def"},
2030 {"type":"Text","value":" "},
2031 {"type":"NameFunction","value":"test1"},
2032 {"type":"Punctuation","value":"():"},
2033 {"type":"Text","value":"\n "},
2034 {"type":"Name","value":"s0"},
2035 {"type":"Text","value":" "},
2036 {"type":"Operator","value":"="},
2037 {"type":"Text","value":" "},
2038 {"type":"LiteralStringDouble","value":"\"Aladdin:open sesame\""},
2039 {"type":"Text","value":"\n "},
2040 {"type":"Name","value":"s1"},
2041 {"type":"Text","value":" "},
2042 {"type":"Operator","value":"="},
2043 {"type":"Text","value":" "},
2044 {"type":"Name","value":"encodestring"},
2045 {"type":"Punctuation","value":"("},
2046 {"type":"Name","value":"s0"},
2047 {"type":"Punctuation","value":")"},
2048 {"type":"Text","value":"\n "},
2049 {"type":"Name","value":"s2"},
2050 {"type":"Text","value":" "},
2051 {"type":"Operator","value":"="},
2052 {"type":"Text","value":" "},
2053 {"type":"Name","value":"decodestring"},
2054 {"type":"Punctuation","value":"("},
2055 {"type":"Name","value":"s1"},
2056 {"type":"Punctuation","value":")"},
2057 {"type":"Text","value":"\n "},
2058 {"type":"Keyword","value":"print"},
2059 {"type":"Text","value":" "},
2060 {"type":"Name","value":"s0"},
2061 {"type":"Punctuation","value":","},
2062 {"type":"Text","value":" "},
2063 {"type":"NameBuiltin","value":"repr"},
2064 {"type":"Punctuation","value":"("},
2065 {"type":"Name","value":"s1"},
2066 {"type":"Punctuation","value":"),"},
2067 {"type":"Text","value":" "},
2068 {"type":"Name","value":"s2"},
2069 {"type":"Text","value":"\n\n\n"},
2070 {"type":"Keyword","value":"if"},
2071 {"type":"Text","value":" "},
2072 {"type":"NameVariableMagic","value":"__name__"},
2073 {"type":"Text","value":" "},
2074 {"type":"Operator","value":"=="},
2075 {"type":"Text","value":" "},
2076 {"type":"LiteralStringSingle","value":"'__main__'"},
2077 {"type":"Punctuation","value":":"},
2078 {"type":"Text","value":"\n "},
2079 {"type":"Name","value":"test"},
2080 {"type":"Punctuation","value":"()"},
2081 {"type":"Text","value":"\n"}
2082]
View as plain text