rapydscript-ng 0.7.18 → 0.7.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.github/workflows/ci.yml +40 -0
  2. package/CHANGELOG.md +49 -1
  3. package/README.md +22 -7
  4. package/bin/web-repl-export +2 -2
  5. package/package.json +2 -2
  6. package/publish.py +9 -8
  7. package/release/baselib-plain-pretty.js +1707 -1044
  8. package/release/baselib-plain-ugly.js +3 -1
  9. package/release/compiler.js +5530 -3366
  10. package/release/signatures.json +18 -17
  11. package/src/ast.pyj +3 -1
  12. package/src/baselib-builtins.pyj +14 -3
  13. package/src/baselib-containers.pyj +13 -6
  14. package/src/baselib-internal.pyj +5 -1
  15. package/src/baselib-str.pyj +15 -2
  16. package/src/lib/elementmaker.pyj +2 -2
  17. package/src/lib/gettext.pyj +8 -7
  18. package/src/lib/random.pyj +1 -0
  19. package/src/lib/re.pyj +4 -3
  20. package/src/lib/traceback.pyj +16 -4
  21. package/src/output/classes.pyj +33 -5
  22. package/src/output/codegen.pyj +5 -38
  23. package/src/output/comments.pyj +45 -0
  24. package/src/output/functions.pyj +30 -19
  25. package/src/output/modules.pyj +19 -6
  26. package/src/output/operators.pyj +50 -19
  27. package/src/output/statements.pyj +2 -2
  28. package/src/output/stream.pyj +13 -21
  29. package/src/parse.pyj +52 -36
  30. package/src/string_interpolation.pyj +6 -1
  31. package/src/tokenizer.pyj +8 -2
  32. package/test/baselib.pyj +10 -0
  33. package/test/classes.pyj +24 -0
  34. package/test/collections.pyj +8 -0
  35. package/test/functions.pyj +16 -0
  36. package/test/generic.pyj +39 -1
  37. package/test/internationalization.pyj +8 -2
  38. package/test/regexp.pyj +3 -2
  39. package/test/scoped_flags.pyj +2 -0
  40. package/test/starargs.pyj +43 -0
  41. package/test/str.pyj +19 -8
  42. package/tools/cli.js +6 -1
  43. package/tools/compiler.js +3 -3
  44. package/tools/embedded_compiler.js +3 -3
  45. package/tools/export.js +3 -3
  46. package/tools/gettext.js +5 -2
  47. package/tools/lint.js +24 -13
  48. package/tools/msgfmt.js +1 -1
  49. package/web-repl/env.js +7 -1
  50. package/.appveyor.yml +0 -13
  51. package/.npmignore +0 -9
  52. package/.travis.yml +0 -12
@@ -3,7 +3,8 @@ function ρσ_bool(val) {
3
3
  return !!val;
4
4
  };
5
5
  if (!ρσ_bool.__argnames__) Object.defineProperties(ρσ_bool, {
6
- __argnames__ : {value: ["val"]}
6
+ __argnames__ : {value: ["val"]},
7
+ __module__ : {value: "__main__"}
7
8
  });
8
9
 
9
10
  function ρσ_print() {
@@ -16,27 +17,43 @@ function ρσ_print() {
16
17
  console.log(parts.join(" "));
17
18
  }
18
19
  };
20
+ if (!ρσ_print.__module__) Object.defineProperties(ρσ_print, {
21
+ __module__ : {value: "__main__"}
22
+ });
19
23
 
20
24
  function ρσ_int(val, base) {
21
25
  var ans;
22
- ans = parseInt(val, base || 10);
26
+ if (typeof val === "number") {
27
+ ans = val | 0;
28
+ } else {
29
+ ans = parseInt(val, base || 10);
30
+ }
23
31
  if (isNaN(ans)) {
24
32
  throw new ValueError("Invalid literal for int with base " + (base || 10) + ": " + val);
25
33
  }
26
34
  return ans;
27
35
  };
28
36
  if (!ρσ_int.__argnames__) Object.defineProperties(ρσ_int, {
29
- __argnames__ : {value: ["val", "base"]}
37
+ __argnames__ : {value: ["val", "base"]},
38
+ __module__ : {value: "__main__"}
30
39
  });
31
40
 
32
- function ρσ_float() {
41
+ function ρσ_float(val) {
33
42
  var ans;
34
- ans = parseFloat.apply(null, arguments);
43
+ if (typeof val === "number") {
44
+ ans = val;
45
+ } else {
46
+ ans = parseFloat(val);
47
+ }
35
48
  if (isNaN(ans)) {
36
49
  throw new ValueError("Could not convert string to float: " + arguments[0]);
37
50
  }
38
51
  return ans;
39
52
  };
53
+ if (!ρσ_float.__argnames__) Object.defineProperties(ρσ_float, {
54
+ __argnames__ : {value: ["val"]},
55
+ __module__ : {value: "__main__"}
56
+ });
40
57
 
41
58
  function ρσ_arraylike_creator() {
42
59
  var names;
@@ -52,29 +69,41 @@ function ρσ_arraylike_creator() {
52
69
  return false;
53
70
  };
54
71
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
55
- __argnames__ : {value: ["x"]}
72
+ __argnames__ : {value: ["x"]},
73
+ __module__ : {value: "__main__"}
56
74
  });
57
75
  return ρσ_anonfunc;
58
76
  })();
59
77
  };
78
+ if (!ρσ_arraylike_creator.__module__) Object.defineProperties(ρσ_arraylike_creator, {
79
+ __module__ : {value: "__main__"}
80
+ });
60
81
 
61
82
  function options_object(f) {
62
- return function () {
63
- if (typeof arguments[arguments.length - 1] === "object") {
64
- arguments[ρσ_bound_index(arguments.length - 1, arguments)][ρσ_kwargs_symbol] = true;
65
- }
66
- return f.apply(this, arguments);
67
- };
83
+ return (function() {
84
+ var ρσ_anonfunc = function () {
85
+ if (typeof arguments[arguments.length - 1] === "object") {
86
+ arguments[ρσ_bound_index(arguments.length - 1, arguments)][ρσ_kwargs_symbol] = true;
87
+ }
88
+ return f.apply(this, arguments);
89
+ };
90
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
91
+ __module__ : {value: "__main__"}
92
+ });
93
+ return ρσ_anonfunc;
94
+ })();
68
95
  };
69
96
  if (!options_object.__argnames__) Object.defineProperties(options_object, {
70
- __argnames__ : {value: ["f"]}
97
+ __argnames__ : {value: ["f"]},
98
+ __module__ : {value: "__main__"}
71
99
  });
72
100
 
73
101
  function ρσ_id(x) {
74
102
  return x.ρσ_object_id;
75
103
  };
76
104
  if (!ρσ_id.__argnames__) Object.defineProperties(ρσ_id, {
77
- __argnames__ : {value: ["x"]}
105
+ __argnames__ : {value: ["x"]},
106
+ __module__ : {value: "__main__"}
78
107
  });
79
108
 
80
109
  function ρσ_dir(item) {
@@ -86,7 +115,8 @@ function ρσ_dir(item) {
86
115
  return arr;
87
116
  };
88
117
  if (!ρσ_dir.__argnames__) Object.defineProperties(ρσ_dir, {
89
- __argnames__ : {value: ["item"]}
118
+ __argnames__ : {value: ["item"]},
119
+ __module__ : {value: "__main__"}
90
120
  });
91
121
 
92
122
  function ρσ_ord(x) {
@@ -102,7 +132,8 @@ function ρσ_ord(x) {
102
132
  return ans;
103
133
  };
104
134
  if (!ρσ_ord.__argnames__) Object.defineProperties(ρσ_ord, {
105
- __argnames__ : {value: ["x"]}
135
+ __argnames__ : {value: ["x"]},
136
+ __module__ : {value: "__main__"}
106
137
  });
107
138
 
108
139
  function ρσ_chr(code) {
@@ -113,14 +144,16 @@ function ρσ_chr(code) {
113
144
  return String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));
114
145
  };
115
146
  if (!ρσ_chr.__argnames__) Object.defineProperties(ρσ_chr, {
116
- __argnames__ : {value: ["code"]}
147
+ __argnames__ : {value: ["code"]},
148
+ __module__ : {value: "__main__"}
117
149
  });
118
150
 
119
151
  function ρσ_callable(x) {
120
152
  return typeof x === "function";
121
153
  };
122
154
  if (!ρσ_callable.__argnames__) Object.defineProperties(ρσ_callable, {
123
- __argnames__ : {value: ["x"]}
155
+ __argnames__ : {value: ["x"]},
156
+ __module__ : {value: "__main__"}
124
157
  });
125
158
 
126
159
  function ρσ_bin(x) {
@@ -137,7 +170,8 @@ function ρσ_bin(x) {
137
170
  return ans;
138
171
  };
139
172
  if (!ρσ_bin.__argnames__) Object.defineProperties(ρσ_bin, {
140
- __argnames__ : {value: ["x"]}
173
+ __argnames__ : {value: ["x"]},
174
+ __module__ : {value: "__main__"}
141
175
  });
142
176
 
143
177
  function ρσ_hex(x) {
@@ -154,65 +188,98 @@ function ρσ_hex(x) {
154
188
  return ans;
155
189
  };
156
190
  if (!ρσ_hex.__argnames__) Object.defineProperties(ρσ_hex, {
157
- __argnames__ : {value: ["x"]}
191
+ __argnames__ : {value: ["x"]},
192
+ __module__ : {value: "__main__"}
158
193
  });
159
194
 
160
195
  function ρσ_enumerate(iterable) {
161
196
  var ans, iterator;
162
197
  ans = {"_i":-1};
163
- ans[ρσ_iterator_symbol] = function () {
164
- return this;
165
- };
166
- if (ρσ_arraylike(iterable)) {
167
- ans["next"] = function () {
168
- this._i += 1;
169
- if (this._i < iterable.length) {
170
- return {'done':false, 'value':[this._i, iterable[this._i]]};
171
- }
172
- return {'done':true};
198
+ ans[ρσ_iterator_symbol] = (function() {
199
+ var ρσ_anonfunc = function () {
200
+ return this;
173
201
  };
202
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
203
+ __module__ : {value: "__main__"}
204
+ });
205
+ return ρσ_anonfunc;
206
+ })();
207
+ if (ρσ_arraylike(iterable)) {
208
+ ans["next"] = (function() {
209
+ var ρσ_anonfunc = function () {
210
+ this._i += 1;
211
+ if (this._i < iterable.length) {
212
+ return {'done':false, 'value':[this._i, iterable[this._i]]};
213
+ }
214
+ return {'done':true};
215
+ };
216
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
217
+ __module__ : {value: "__main__"}
218
+ });
219
+ return ρσ_anonfunc;
220
+ })();
174
221
  return ans;
175
222
  }
176
223
  if (typeof iterable[ρσ_iterator_symbol] === "function") {
177
224
  iterator = (typeof Map === "function" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();
178
225
  ans["_iterator"] = iterator;
179
- ans["next"] = function () {
180
- var r;
181
- r = this._iterator.next();
182
- if (r.done) {
183
- return {'done':true};
184
- }
185
- this._i += 1;
186
- return {'done':false, 'value':[this._i, r.value]};
187
- };
226
+ ans["next"] = (function() {
227
+ var ρσ_anonfunc = function () {
228
+ var r;
229
+ r = this._iterator.next();
230
+ if (r.done) {
231
+ return {'done':true};
232
+ }
233
+ this._i += 1;
234
+ return {'done':false, 'value':[this._i, r.value]};
235
+ };
236
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
237
+ __module__ : {value: "__main__"}
238
+ });
239
+ return ρσ_anonfunc;
240
+ })();
188
241
  return ans;
189
242
  }
190
243
  return ρσ_enumerate(Object.keys(iterable));
191
244
  };
192
245
  if (!ρσ_enumerate.__argnames__) Object.defineProperties(ρσ_enumerate, {
193
- __argnames__ : {value: ["iterable"]}
246
+ __argnames__ : {value: ["iterable"]},
247
+ __module__ : {value: "__main__"}
194
248
  });
195
249
 
196
250
  function ρσ_reversed(iterable) {
197
251
  var ans;
198
252
  if (ρσ_arraylike(iterable)) {
199
253
  ans = {"_i": iterable.length};
200
- ans["next"] = function () {
201
- this._i -= 1;
202
- if (this._i > -1) {
203
- return {'done':false, 'value':iterable[this._i]};
204
- }
205
- return {'done':true};
206
- };
207
- ans[ρσ_iterator_symbol] = function () {
208
- return this;
209
- };
254
+ ans["next"] = (function() {
255
+ var ρσ_anonfunc = function () {
256
+ this._i -= 1;
257
+ if (this._i > -1) {
258
+ return {'done':false, 'value':iterable[this._i]};
259
+ }
260
+ return {'done':true};
261
+ };
262
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
263
+ __module__ : {value: "__main__"}
264
+ });
265
+ return ρσ_anonfunc;
266
+ })();
267
+ ans[ρσ_iterator_symbol] = (function() {
268
+ var ρσ_anonfunc = function () {
269
+ return this;
270
+ };
271
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
272
+ __module__ : {value: "__main__"}
273
+ });
274
+ return ρσ_anonfunc;
275
+ })();
210
276
  return ans;
211
277
  }
212
278
  throw new TypeError("reversed() can only be called on arrays or strings");
213
279
  };
214
280
  if (!ρσ_reversed.__argnames__) Object.defineProperties(ρσ_reversed, {
215
- __argnames__ : {value: ["iterable"]}
281
+ __argnames__ : {value: ["iterable"]},
282
+ __module__ : {value: "__main__"}
216
283
  });
217
284
 
218
285
  function ρσ_iter(iterable) {
@@ -222,22 +289,35 @@ function ρσ_iter(iterable) {
222
289
  }
223
290
  if (ρσ_arraylike(iterable)) {
224
291
  ans = {"_i":-1};
225
- ans[ρσ_iterator_symbol] = function () {
226
- return this;
227
- };
228
- ans["next"] = function () {
229
- this._i += 1;
230
- if (this._i < iterable.length) {
231
- return {'done':false, 'value':iterable[this._i]};
232
- }
233
- return {'done':true};
234
- };
292
+ ans[ρσ_iterator_symbol] = (function() {
293
+ var ρσ_anonfunc = function () {
294
+ return this;
295
+ };
296
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
297
+ __module__ : {value: "__main__"}
298
+ });
299
+ return ρσ_anonfunc;
300
+ })();
301
+ ans["next"] = (function() {
302
+ var ρσ_anonfunc = function () {
303
+ this._i += 1;
304
+ if (this._i < iterable.length) {
305
+ return {'done':false, 'value':iterable[this._i]};
306
+ }
307
+ return {'done':true};
308
+ };
309
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
310
+ __module__ : {value: "__main__"}
311
+ });
312
+ return ρσ_anonfunc;
313
+ })();
235
314
  return ans;
236
315
  }
237
316
  return ρσ_iter(Object.keys(iterable));
238
317
  };
239
318
  if (!ρσ_iter.__argnames__) Object.defineProperties(ρσ_iter, {
240
- __argnames__ : {value: ["iterable"]}
319
+ __argnames__ : {value: ["iterable"]},
320
+ __module__ : {value: "__main__"}
241
321
  });
242
322
 
243
323
  function ρσ_range_next(step, length) {
@@ -253,7 +333,8 @@ function ρσ_range_next(step, length) {
253
333
  return {'done':false, 'value':this._i};
254
334
  };
255
335
  if (!ρσ_range_next.__argnames__) Object.defineProperties(ρσ_range_next, {
256
- __argnames__ : {value: ["step", "length"]}
336
+ __argnames__ : {value: ["step", "length"]},
337
+ __module__ : {value: "__main__"}
257
338
  });
258
339
 
259
340
  function ρσ_range(start, stop, step) {
@@ -265,15 +346,27 @@ function ρσ_range(start, stop, step) {
265
346
  step = arguments[2] || 1;
266
347
  length = Math.max(Math.ceil((stop - start) / step), 0);
267
348
  ans = {start:start, step:step, stop:stop};
268
- ans[ρσ_iterator_symbol] = function () {
269
- var it;
270
- it = {"_i": start - step, "_idx": -1};
271
- it.next = ρσ_range_next.bind(it, step, length);
272
- it[ρσ_iterator_symbol] = function () {
273
- return this;
349
+ ans[ρσ_iterator_symbol] = (function() {
350
+ var ρσ_anonfunc = function () {
351
+ var it;
352
+ it = {"_i": start - step, "_idx": -1};
353
+ it.next = ρσ_range_next.bind(it, step, length);
354
+ it[ρσ_iterator_symbol] = (function() {
355
+ var ρσ_anonfunc = function () {
356
+ return this;
357
+ };
358
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
359
+ __module__ : {value: "__main__"}
360
+ });
361
+ return ρσ_anonfunc;
362
+ })();
363
+ return it;
274
364
  };
275
- return it;
276
- };
365
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
366
+ __module__ : {value: "__main__"}
367
+ });
368
+ return ρσ_anonfunc;
369
+ })();
277
370
  ans.count = (function() {
278
371
  var ρσ_anonfunc = function (val) {
279
372
  if (!this._cached) {
@@ -282,7 +375,8 @@ function ρσ_range(start, stop, step) {
282
375
  return this._cached.count(val);
283
376
  };
284
377
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
285
- __argnames__ : {value: ["val"]}
378
+ __argnames__ : {value: ["val"]},
379
+ __module__ : {value: "__main__"}
286
380
  });
287
381
  return ρσ_anonfunc;
288
382
  })();
@@ -294,10 +388,30 @@ function ρσ_range(start, stop, step) {
294
388
  return this._cached.index(val);
295
389
  };
296
390
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
297
- __argnames__ : {value: ["val"]}
391
+ __argnames__ : {value: ["val"]},
392
+ __module__ : {value: "__main__"}
393
+ });
394
+ return ρσ_anonfunc;
395
+ })();
396
+ ans.__len__ = (function() {
397
+ var ρσ_anonfunc = function () {
398
+ return length;
399
+ };
400
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
401
+ __module__ : {value: "__main__"}
402
+ });
403
+ return ρσ_anonfunc;
404
+ })();
405
+ ans.__repr__ = (function() {
406
+ var ρσ_anonfunc = function () {
407
+ return "range(" + ρσ_str.format("{}", start) + ", " + ρσ_str.format("{}", stop) + ", " + ρσ_str.format("{}", step) + ")";
408
+ };
409
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
410
+ __module__ : {value: "__main__"}
298
411
  });
299
412
  return ρσ_anonfunc;
300
413
  })();
414
+ ans.__str__ = ans.toString = ans.__repr__;
301
415
  if (typeof Proxy === "function") {
302
416
  ans = new Proxy(ans, (function(){
303
417
  var ρσ_d = {};
@@ -319,7 +433,8 @@ function ρσ_range(start, stop, step) {
319
433
  return obj[(typeof prop === "number" && prop < 0) ? obj.length + prop : prop];
320
434
  };
321
435
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
322
- __argnames__ : {value: ["obj", "prop"]}
436
+ __argnames__ : {value: ["obj", "prop"]},
437
+ __module__ : {value: "__main__"}
323
438
  });
324
439
  return ρσ_anonfunc;
325
440
  })();
@@ -329,7 +444,8 @@ function ρσ_range(start, stop, step) {
329
444
  return ans;
330
445
  };
331
446
  if (!ρσ_range.__argnames__) Object.defineProperties(ρσ_range, {
332
- __argnames__ : {value: ["start", "stop", "step"]}
447
+ __argnames__ : {value: ["start", "stop", "step"]},
448
+ __module__ : {value: "__main__"}
333
449
  });
334
450
 
335
451
  function ρσ_getattr(obj, name, defval) {
@@ -356,60 +472,72 @@ function ρσ_getattr(obj, name, defval) {
356
472
  return ret;
357
473
  };
358
474
  if (!ρσ_getattr.__argnames__) Object.defineProperties(ρσ_getattr, {
359
- __argnames__ : {value: ["obj", "name", "defval"]}
475
+ __argnames__ : {value: ["obj", "name", "defval"]},
476
+ __module__ : {value: "__main__"}
360
477
  });
361
478
 
362
479
  function ρσ_setattr(obj, name, value) {
363
480
  obj[(typeof name === "number" && name < 0) ? obj.length + name : name] = value;
364
481
  };
365
482
  if (!ρσ_setattr.__argnames__) Object.defineProperties(ρσ_setattr, {
366
- __argnames__ : {value: ["obj", "name", "value"]}
483
+ __argnames__ : {value: ["obj", "name", "value"]},
484
+ __module__ : {value: "__main__"}
367
485
  });
368
486
 
369
487
  function ρσ_hasattr(obj, name) {
370
488
  return name in obj;
371
489
  };
372
490
  if (!ρσ_hasattr.__argnames__) Object.defineProperties(ρσ_hasattr, {
373
- __argnames__ : {value: ["obj", "name"]}
491
+ __argnames__ : {value: ["obj", "name"]},
492
+ __module__ : {value: "__main__"}
374
493
  });
375
494
 
376
- ρσ_len = function () {
377
- function len(obj) {
378
- if (ρσ_arraylike(obj)) {
379
- return obj.length;
380
- }
381
- if (typeof obj.__len__ === "function") {
382
- return obj.__len__();
383
- }
384
- if (obj instanceof Set || obj instanceof Map) {
385
- return obj.size;
386
- }
387
- return Object.keys(obj).length;
388
- };
389
- if (!len.__argnames__) Object.defineProperties(len, {
390
- __argnames__ : {value: ["obj"]}
391
- });
495
+ ρσ_len = (function() {
496
+ var ρσ_anonfunc = function () {
497
+ function len(obj) {
498
+ if (ρσ_arraylike(obj)) {
499
+ return obj.length;
500
+ }
501
+ if (typeof obj.__len__ === "function") {
502
+ return obj.__len__();
503
+ }
504
+ if (obj instanceof Set || obj instanceof Map) {
505
+ return obj.size;
506
+ }
507
+ return Object.keys(obj).length;
508
+ };
509
+ if (!len.__argnames__) Object.defineProperties(len, {
510
+ __argnames__ : {value: ["obj"]},
511
+ __module__ : {value: "__main__"}
512
+ });
392
513
 
393
- function len5(obj) {
394
- if (ρσ_arraylike(obj)) {
395
- return obj.length;
396
- }
397
- if (typeof obj.__len__ === "function") {
398
- return obj.__len__();
399
- }
400
- return Object.keys(obj).length;
514
+ function len5(obj) {
515
+ if (ρσ_arraylike(obj)) {
516
+ return obj.length;
517
+ }
518
+ if (typeof obj.__len__ === "function") {
519
+ return obj.__len__();
520
+ }
521
+ return Object.keys(obj).length;
522
+ };
523
+ if (!len5.__argnames__) Object.defineProperties(len5, {
524
+ __argnames__ : {value: ["obj"]},
525
+ __module__ : {value: "__main__"}
526
+ });
527
+
528
+ return (typeof Set === "function" && typeof Map === "function") ? len : len5;
401
529
  };
402
- if (!len5.__argnames__) Object.defineProperties(len5, {
403
- __argnames__ : {value: ["obj"]}
530
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
531
+ __module__ : {value: "__main__"}
404
532
  });
405
-
406
- return (typeof Set === "function" && typeof Map === "function") ? len : len5;
407
- }();
533
+ return ρσ_anonfunc;
534
+ })()();
408
535
  function ρσ_get_module(name) {
409
536
  return ρσ_modules[(typeof name === "number" && name < 0) ? ρσ_modules.length + name : name];
410
537
  };
411
538
  if (!ρσ_get_module.__argnames__) Object.defineProperties(ρσ_get_module, {
412
- __argnames__ : {value: ["name"]}
539
+ __argnames__ : {value: ["name"]},
540
+ __module__ : {value: "__main__"}
413
541
  });
414
542
 
415
543
  function ρσ_pow(x, y, z) {
@@ -421,14 +549,16 @@ function ρσ_pow(x, y, z) {
421
549
  return ans;
422
550
  };
423
551
  if (!ρσ_pow.__argnames__) Object.defineProperties(ρσ_pow, {
424
- __argnames__ : {value: ["x", "y", "z"]}
552
+ __argnames__ : {value: ["x", "y", "z"]},
553
+ __module__ : {value: "__main__"}
425
554
  });
426
555
 
427
556
  function ρσ_type(x) {
428
557
  return x.constructor;
429
558
  };
430
559
  if (!ρσ_type.__argnames__) Object.defineProperties(ρσ_type, {
431
- __argnames__ : {value: ["x"]}
560
+ __argnames__ : {value: ["x"]},
561
+ __module__ : {value: "__main__"}
432
562
  });
433
563
 
434
564
  function ρσ_divmod(x, y) {
@@ -440,7 +570,8 @@ function ρσ_divmod(x, y) {
440
570
  return [d, x - d * y];
441
571
  };
442
572
  if (!ρσ_divmod.__argnames__) Object.defineProperties(ρσ_divmod, {
443
- __argnames__ : {value: ["x", "y"]}
573
+ __argnames__ : {value: ["x", "y"]},
574
+ __module__ : {value: "__main__"}
444
575
  });
445
576
 
446
577
  function ρσ_max() {
@@ -481,7 +612,8 @@ function ρσ_max() {
481
612
  throw new TypeError("expected at least one argument");
482
613
  };
483
614
  if (!ρσ_max.__handles_kwarg_interpolation__) Object.defineProperties(ρσ_max, {
484
- __handles_kwarg_interpolation__ : {value: true}
615
+ __handles_kwarg_interpolation__ : {value: true},
616
+ __module__ : {value: "__main__"}
485
617
  });
486
618
 
487
619
  var abs = Math.abs, max = ρσ_max.bind(Math.max), min = ρσ_max.bind(Math.min), bool = ρσ_bool, type = ρσ_type;
@@ -505,7 +637,7 @@ var range = ρσ_range, getattr = ρσ_getattr, setattr = ρσ_setattr, hasattr
505
637
  return false;
506
638
  }
507
639
  for (var i=0; i < a.length; i++) {
508
- if (!((a[(typeof i === "number" && i < 0) ? a.length + i : i] === b[(typeof i === "number" && i < 0) ? b.length + i : i] || typeof a[(typeof i === "number" && i < 0) ? a.length + i : i] === "object" && ρσ_equals(a[(typeof i === "number" && i < 0) ? a.length + i : i], b[(typeof i === "number" && i < 0) ? b.length + i : i])))) {
640
+ if (!(((a[(typeof i === "number" && i < 0) ? a.length + i : i] === b[(typeof i === "number" && i < 0) ? b.length + i : i] || typeof a[(typeof i === "number" && i < 0) ? a.length + i : i] === "object" && ρσ_equals(a[(typeof i === "number" && i < 0) ? a.length + i : i], b[(typeof i === "number" && i < 0) ? b.length + i : i]))))) {
509
641
  return false;
510
642
  }
511
643
  }
@@ -520,7 +652,7 @@ var range = ρσ_range, getattr = ρσ_getattr, setattr = ρσ_setattr, hasattr
520
652
  }
521
653
  for (var j=0; j < akeys.length; j++) {
522
654
  key = akeys[(typeof j === "number" && j < 0) ? akeys.length + j : j];
523
- if (!((a[(typeof key === "number" && key < 0) ? a.length + key : key] === b[(typeof key === "number" && key < 0) ? b.length + key : key] || typeof a[(typeof key === "number" && key < 0) ? a.length + key : key] === "object" && ρσ_equals(a[(typeof key === "number" && key < 0) ? a.length + key : key], b[(typeof key === "number" && key < 0) ? b.length + key : key])))) {
655
+ if (!(((a[(typeof key === "number" && key < 0) ? a.length + key : key] === b[(typeof key === "number" && key < 0) ? b.length + key : key] || typeof a[(typeof key === "number" && key < 0) ? a.length + key : key] === "object" && ρσ_equals(a[(typeof key === "number" && key < 0) ? a.length + key : key], b[(typeof key === "number" && key < 0) ? b.length + key : key]))))) {
524
656
  return false;
525
657
  }
526
658
  }
@@ -529,7 +661,8 @@ var range = ρσ_range, getattr = ρσ_getattr, setattr = ρσ_setattr, hasattr
529
661
  return false;
530
662
  };
531
663
  if (!ρσ_equals.__argnames__) Object.defineProperties(ρσ_equals, {
532
- __argnames__ : {value: ["a", "b"]}
664
+ __argnames__ : {value: ["a", "b"]},
665
+ __module__ : {value: "__main__"}
533
666
  });
534
667
 
535
668
  function ρσ_not_equals(a, b) {
@@ -545,7 +678,8 @@ function ρσ_not_equals(a, b) {
545
678
  return !ρσ_equals(a, b);
546
679
  };
547
680
  if (!ρσ_not_equals.__argnames__) Object.defineProperties(ρσ_not_equals, {
548
- __argnames__ : {value: ["a", "b"]}
681
+ __argnames__ : {value: ["a", "b"]},
682
+ __module__ : {value: "__main__"}
549
683
  });
550
684
 
551
685
  var equals = ρσ_equals;
@@ -567,7 +701,8 @@ function ρσ_list_extend(iterable) {
567
701
  }
568
702
  };
569
703
  if (!ρσ_list_extend.__argnames__) Object.defineProperties(ρσ_list_extend, {
570
- __argnames__ : {value: ["iterable"]}
704
+ __argnames__ : {value: ["iterable"]},
705
+ __module__ : {value: "__main__"}
571
706
  });
572
707
 
573
708
  function ρσ_list_index(val, start, stop) {
@@ -597,7 +732,8 @@ function ρσ_list_index(val, start, stop) {
597
732
  throw new ValueError(val + " is not in list");
598
733
  };
599
734
  if (!ρσ_list_index.__argnames__) Object.defineProperties(ρσ_list_index, {
600
- __argnames__ : {value: ["val", "start", "stop"]}
735
+ __argnames__ : {value: ["val", "start", "stop"]},
736
+ __module__ : {value: "__main__"}
601
737
  });
602
738
 
603
739
  function ρσ_list_pop(index) {
@@ -605,6 +741,9 @@ function ρσ_list_pop(index) {
605
741
  if (this.length === 0) {
606
742
  throw new IndexError("list is empty");
607
743
  }
744
+ if (index === undefined) {
745
+ index = -1;
746
+ }
608
747
  ans = this.splice(index, 1);
609
748
  if (!ans.length) {
610
749
  throw new IndexError("pop index out of range");
@@ -612,7 +751,8 @@ function ρσ_list_pop(index) {
612
751
  return ans[0];
613
752
  };
614
753
  if (!ρσ_list_pop.__argnames__) Object.defineProperties(ρσ_list_pop, {
615
- __argnames__ : {value: ["index"]}
754
+ __argnames__ : {value: ["index"]},
755
+ __module__ : {value: "__main__"}
616
756
  });
617
757
 
618
758
  function ρσ_list_remove(value) {
@@ -624,12 +764,16 @@ function ρσ_list_remove(value) {
624
764
  this.splice(idx, 1);
625
765
  };
626
766
  if (!ρσ_list_remove.__argnames__) Object.defineProperties(ρσ_list_remove, {
627
- __argnames__ : {value: ["value"]}
767
+ __argnames__ : {value: ["value"]},
768
+ __module__ : {value: "__main__"}
628
769
  });
629
770
 
630
771
  function ρσ_list_to_string() {
631
772
  return "[" + this.join(", ") + "]";
632
773
  };
774
+ if (!ρσ_list_to_string.__module__) Object.defineProperties(ρσ_list_to_string, {
775
+ __module__ : {value: "__main__"}
776
+ });
633
777
 
634
778
  function ρσ_list_insert(index, val) {
635
779
  if (index < 0) {
@@ -646,20 +790,30 @@ function ρσ_list_insert(index, val) {
646
790
  (ρσ_expr_temp = this)[(typeof index === "number" && index < 0) ? ρσ_expr_temp.length + index : index] = val;
647
791
  };
648
792
  if (!ρσ_list_insert.__argnames__) Object.defineProperties(ρσ_list_insert, {
649
- __argnames__ : {value: ["index", "val"]}
793
+ __argnames__ : {value: ["index", "val"]},
794
+ __module__ : {value: "__main__"}
650
795
  });
651
796
 
652
797
  function ρσ_list_copy() {
653
798
  return ρσ_list_constructor(this);
654
799
  };
800
+ if (!ρσ_list_copy.__module__) Object.defineProperties(ρσ_list_copy, {
801
+ __module__ : {value: "__main__"}
802
+ });
655
803
 
656
804
  function ρσ_list_clear() {
657
805
  this.length = 0;
658
806
  };
807
+ if (!ρσ_list_clear.__module__) Object.defineProperties(ρσ_list_clear, {
808
+ __module__ : {value: "__main__"}
809
+ });
659
810
 
660
811
  function ρσ_list_as_array() {
661
812
  return Array.prototype.slice.call(this);
662
813
  };
814
+ if (!ρσ_list_as_array.__module__) Object.defineProperties(ρσ_list_as_array, {
815
+ __module__ : {value: "__main__"}
816
+ });
663
817
 
664
818
  function ρσ_list_count(value) {
665
819
  return this.reduce((function() {
@@ -667,13 +821,15 @@ function ρσ_list_count(value) {
667
821
  return n + (val === value);
668
822
  };
669
823
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
670
- __argnames__ : {value: ["n", "val"]}
824
+ __argnames__ : {value: ["n", "val"]},
825
+ __module__ : {value: "__main__"}
671
826
  });
672
827
  return ρσ_anonfunc;
673
828
  })(), 0);
674
829
  };
675
830
  if (!ρσ_list_count.__argnames__) Object.defineProperties(ρσ_list_count, {
676
- __argnames__ : {value: ["value"]}
831
+ __argnames__ : {value: ["value"]},
832
+ __module__ : {value: "__main__"}
677
833
  });
678
834
 
679
835
  function ρσ_list_sort_key(value) {
@@ -685,7 +841,8 @@ function ρσ_list_sort_key(value) {
685
841
  return value.toString();
686
842
  };
687
843
  if (!ρσ_list_sort_key.__argnames__) Object.defineProperties(ρσ_list_sort_key, {
688
- __argnames__ : {value: ["value"]}
844
+ __argnames__ : {value: ["value"]},
845
+ __module__ : {value: "__main__"}
689
846
  });
690
847
 
691
848
  function ρσ_list_sort_cmp(a, b, ap, bp) {
@@ -698,7 +855,8 @@ function ρσ_list_sort_cmp(a, b, ap, bp) {
698
855
  return ap - bp;
699
856
  };
700
857
  if (!ρσ_list_sort_cmp.__argnames__) Object.defineProperties(ρσ_list_sort_cmp, {
701
- __argnames__ : {value: ["a", "b", "ap", "bp"]}
858
+ __argnames__ : {value: ["a", "b", "ap", "bp"]},
859
+ __module__ : {value: "__main__"}
702
860
  });
703
861
 
704
862
  function ρσ_list_sort() {
@@ -727,7 +885,8 @@ function ρσ_list_sort() {
727
885
  return mult * ρσ_list_sort_cmp(keymap.get(a), keymap.get(b), posmap.get(a), posmap.get(b));
728
886
  };
729
887
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
730
- __argnames__ : {value: ["a", "b"]}
888
+ __argnames__ : {value: ["a", "b"]},
889
+ __module__ : {value: "__main__"}
731
890
  });
732
891
  return ρσ_anonfunc;
733
892
  })());
@@ -735,7 +894,8 @@ function ρσ_list_sort() {
735
894
  if (!ρσ_list_sort.__defaults__) Object.defineProperties(ρσ_list_sort, {
736
895
  __defaults__ : {value: {key:null, reverse:false}},
737
896
  __handles_kwarg_interpolation__ : {value: true},
738
- __argnames__ : {value: ["key", "reverse"]}
897
+ __argnames__ : {value: ["key", "reverse"]},
898
+ __module__ : {value: "__main__"}
739
899
  });
740
900
 
741
901
  function ρσ_list_concat() {
@@ -744,6 +904,9 @@ function ρσ_list_concat() {
744
904
  ρσ_list_decorate(ans);
745
905
  return ans;
746
906
  };
907
+ if (!ρσ_list_concat.__module__) Object.defineProperties(ρσ_list_concat, {
908
+ __module__ : {value: "__main__"}
909
+ });
747
910
 
748
911
  function ρσ_list_slice() {
749
912
  var ans;
@@ -751,6 +914,9 @@ function ρσ_list_slice() {
751
914
  ρσ_list_decorate(ans);
752
915
  return ans;
753
916
  };
917
+ if (!ρσ_list_slice.__module__) Object.defineProperties(ρσ_list_slice, {
918
+ __module__ : {value: "__main__"}
919
+ });
754
920
 
755
921
  function ρσ_list_iterator(value) {
756
922
  var self;
@@ -759,32 +925,42 @@ function ρσ_list_iterator(value) {
759
925
  var ρσ_d = {};
760
926
  ρσ_d["_i"] = -1;
761
927
  ρσ_d["_list"] = self;
762
- ρσ_d["next"] = function () {
763
- this._i += 1;
764
- if (this._i >= this._list.length) {
928
+ ρσ_d["next"] = (function() {
929
+ var ρσ_anonfunc = function () {
930
+ this._i += 1;
931
+ if (this._i >= this._list.length) {
932
+ return (function(){
933
+ var ρσ_d = {};
934
+ ρσ_d["done"] = true;
935
+ return ρσ_d;
936
+ }).call(this);
937
+ }
765
938
  return (function(){
766
939
  var ρσ_d = {};
767
- ρσ_d["done"] = true;
940
+ ρσ_d["done"] = false;
941
+ ρσ_d["value"] = (ρσ_expr_temp = this._list)[ρσ_bound_index(this._i, ρσ_expr_temp)];
768
942
  return ρσ_d;
769
943
  }).call(this);
770
- }
771
- return (function(){
772
- var ρσ_d = {};
773
- ρσ_d["done"] = false;
774
- ρσ_d["value"] = (ρσ_expr_temp = this._list)[ρσ_bound_index(this._i, ρσ_expr_temp)];
775
- return ρσ_d;
776
- }).call(this);
777
- };
944
+ };
945
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
946
+ __module__ : {value: "__main__"}
947
+ });
948
+ return ρσ_anonfunc;
949
+ })();
778
950
  return ρσ_d;
779
951
  }).call(this);
780
952
  };
781
953
  if (!ρσ_list_iterator.__argnames__) Object.defineProperties(ρσ_list_iterator, {
782
- __argnames__ : {value: ["value"]}
954
+ __argnames__ : {value: ["value"]},
955
+ __module__ : {value: "__main__"}
783
956
  });
784
957
 
785
958
  function ρσ_list_len() {
786
959
  return this.length;
787
960
  };
961
+ if (!ρσ_list_len.__module__) Object.defineProperties(ρσ_list_len, {
962
+ __module__ : {value: "__main__"}
963
+ });
788
964
 
789
965
  function ρσ_list_contains(val) {
790
966
  for (var i = 0; i < this.length; i++) {
@@ -795,7 +971,8 @@ function ρσ_list_contains(val) {
795
971
  return false;
796
972
  };
797
973
  if (!ρσ_list_contains.__argnames__) Object.defineProperties(ρσ_list_contains, {
798
- __argnames__ : {value: ["val"]}
974
+ __argnames__ : {value: ["val"]},
975
+ __module__ : {value: "__main__"}
799
976
  });
800
977
 
801
978
  function ρσ_list_eq(other) {
@@ -806,14 +983,15 @@ function ρσ_list_eq(other) {
806
983
  return false;
807
984
  }
808
985
  for (var i = 0; i < this.length; i++) {
809
- if (!(((ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] === other[(typeof i === "number" && i < 0) ? other.length + i : i] || typeof (ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] === "object" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i], other[(typeof i === "number" && i < 0) ? other.length + i : i])))) {
986
+ if (!((((ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] === other[(typeof i === "number" && i < 0) ? other.length + i : i] || typeof (ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] === "object" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i], other[(typeof i === "number" && i < 0) ? other.length + i : i]))))) {
810
987
  return false;
811
988
  }
812
989
  }
813
990
  return true;
814
991
  };
815
992
  if (!ρσ_list_eq.__argnames__) Object.defineProperties(ρσ_list_eq, {
816
- __argnames__ : {value: ["other"]}
993
+ __argnames__ : {value: ["other"]},
994
+ __module__ : {value: "__main__"}
817
995
  });
818
996
 
819
997
  function ρσ_list_decorate(ans) {
@@ -842,7 +1020,8 @@ function ρσ_list_decorate(ans) {
842
1020
  return ans;
843
1021
  };
844
1022
  if (!ρσ_list_decorate.__argnames__) Object.defineProperties(ρσ_list_decorate, {
845
- __argnames__ : {value: ["ans"]}
1023
+ __argnames__ : {value: ["ans"]},
1024
+ __module__ : {value: "__main__"}
846
1025
  });
847
1026
 
848
1027
  function ρσ_list_constructor(iterable) {
@@ -870,7 +1049,8 @@ function ρσ_list_constructor(iterable) {
870
1049
  return ρσ_list_decorate(ans);
871
1050
  };
872
1051
  if (!ρσ_list_constructor.__argnames__) Object.defineProperties(ρσ_list_constructor, {
873
- __argnames__ : {value: ["iterable"]}
1052
+ __argnames__ : {value: ["iterable"]},
1053
+ __module__ : {value: "__main__"}
874
1054
  });
875
1055
 
876
1056
  ρσ_list_constructor.__name__ = "list";
@@ -895,7 +1075,8 @@ function sorted() {
895
1075
  if (!sorted.__defaults__) Object.defineProperties(sorted, {
896
1076
  __defaults__ : {value: {key:null, reverse:false}},
897
1077
  __handles_kwarg_interpolation__ : {value: true},
898
- __argnames__ : {value: ["iterable", "key", "reverse"]}
1078
+ __argnames__ : {value: ["iterable", "key", "reverse"]},
1079
+ __module__ : {value: "__main__"}
899
1080
  });
900
1081
 
901
1082
  var ρσ_global_object_id = 0, ρσ_set_implementation;
@@ -920,13 +1101,17 @@ function ρσ_set_keyfor(x) {
920
1101
  return ans;
921
1102
  };
922
1103
  if (!ρσ_set_keyfor.__argnames__) Object.defineProperties(ρσ_set_keyfor, {
923
- __argnames__ : {value: ["x"]}
1104
+ __argnames__ : {value: ["x"]},
1105
+ __module__ : {value: "__main__"}
924
1106
  });
925
1107
 
926
1108
  function ρσ_set_polyfill() {
927
1109
  this._store = {};
928
1110
  this.size = 0;
929
1111
  };
1112
+ if (!ρσ_set_polyfill.__module__) Object.defineProperties(ρσ_set_polyfill, {
1113
+ __module__ : {value: "__main__"}
1114
+ });
930
1115
 
931
1116
  ρσ_set_polyfill.prototype.add = (function() {
932
1117
  var ρσ_anonfunc = function (x) {
@@ -939,7 +1124,8 @@ function ρσ_set_polyfill() {
939
1124
  return this;
940
1125
  };
941
1126
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
942
- __argnames__ : {value: ["x"]}
1127
+ __argnames__ : {value: ["x"]},
1128
+ __module__ : {value: "__main__"}
943
1129
  });
944
1130
  return ρσ_anonfunc;
945
1131
  })();
@@ -949,7 +1135,8 @@ function ρσ_set_polyfill() {
949
1135
  this.size = 0;
950
1136
  };
951
1137
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
952
- __argnames__ : {value: ["x"]}
1138
+ __argnames__ : {value: ["x"]},
1139
+ __module__ : {value: "__main__"}
953
1140
  });
954
1141
  return ρσ_anonfunc;
955
1142
  })();
@@ -965,7 +1152,8 @@ function ρσ_set_polyfill() {
965
1152
  return false;
966
1153
  };
967
1154
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
968
- __argnames__ : {value: ["x"]}
1155
+ __argnames__ : {value: ["x"]},
1156
+ __module__ : {value: "__main__"}
969
1157
  });
970
1158
  return ρσ_anonfunc;
971
1159
  })();
@@ -974,7 +1162,8 @@ function ρσ_set_polyfill() {
974
1162
  return Object.prototype.hasOwnProperty.call(this._store, ρσ_set_keyfor(x));
975
1163
  };
976
1164
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
977
- __argnames__ : {value: ["x"]}
1165
+ __argnames__ : {value: ["x"]},
1166
+ __module__ : {value: "__main__"}
978
1167
  });
979
1168
  return ρσ_anonfunc;
980
1169
  })();
@@ -982,20 +1171,33 @@ function ρσ_set_polyfill() {
982
1171
  var ρσ_anonfunc = function (x) {
983
1172
  var ans;
984
1173
  ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};
985
- ans[ρσ_iterator_symbol] = function () {
986
- return this;
987
- };
988
- ans["next"] = function () {
989
- this._i += 1;
990
- if (this._i >= this._keys.length) {
991
- return {'done': true};
992
- }
993
- return {'done':false, 'value':this._s[this._keys[this._i]]};
994
- };
1174
+ ans[ρσ_iterator_symbol] = (function() {
1175
+ var ρσ_anonfunc = function () {
1176
+ return this;
1177
+ };
1178
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1179
+ __module__ : {value: "__main__"}
1180
+ });
1181
+ return ρσ_anonfunc;
1182
+ })();
1183
+ ans["next"] = (function() {
1184
+ var ρσ_anonfunc = function () {
1185
+ this._i += 1;
1186
+ if (this._i >= this._keys.length) {
1187
+ return {'done': true};
1188
+ }
1189
+ return {'done':false, 'value':this._s[this._keys[this._i]]};
1190
+ };
1191
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1192
+ __module__ : {value: "__main__"}
1193
+ });
1194
+ return ρσ_anonfunc;
1195
+ })();
995
1196
  return ans;
996
1197
  };
997
1198
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
998
- __argnames__ : {value: ["x"]}
1199
+ __argnames__ : {value: ["x"]},
1200
+ __module__ : {value: "__main__"}
999
1201
  });
1000
1202
  return ρσ_anonfunc;
1001
1203
  })();
@@ -1036,7 +1238,8 @@ function ρσ_set(iterable) {
1036
1238
  }
1037
1239
  };
1038
1240
  if (!ρσ_set.__argnames__) Object.defineProperties(ρσ_set, {
1039
- __argnames__ : {value: ["iterable"]}
1241
+ __argnames__ : {value: ["iterable"]},
1242
+ __module__ : {value: "__main__"}
1040
1243
  });
1041
1244
 
1042
1245
  ρσ_set.prototype.__name__ = "set";
@@ -1044,29 +1247,48 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1044
1247
  var ρσ_d = {};
1045
1248
  ρσ_d["length"] = (function(){
1046
1249
  var ρσ_d = {};
1047
- ρσ_d["get"] = function () {
1048
- return this.jsset.size;
1049
- };
1250
+ ρσ_d["get"] = (function() {
1251
+ var ρσ_anonfunc = function () {
1252
+ return this.jsset.size;
1253
+ };
1254
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1255
+ __module__ : {value: "__main__"}
1256
+ });
1257
+ return ρσ_anonfunc;
1258
+ })();
1050
1259
  return ρσ_d;
1051
1260
  }).call(this);
1052
1261
  ρσ_d["size"] = (function(){
1053
1262
  var ρσ_d = {};
1054
- ρσ_d["get"] = function () {
1055
- return this.jsset.size;
1056
- };
1263
+ ρσ_d["get"] = (function() {
1264
+ var ρσ_anonfunc = function () {
1265
+ return this.jsset.size;
1266
+ };
1267
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1268
+ __module__ : {value: "__main__"}
1269
+ });
1270
+ return ρσ_anonfunc;
1271
+ })();
1057
1272
  return ρσ_d;
1058
1273
  }).call(this);
1059
1274
  return ρσ_d;
1060
1275
  }).call(this));
1061
- ρσ_set.prototype.__len__ = function () {
1062
- return this.jsset.size;
1063
- };
1276
+ ρσ_set.prototype.__len__ = (function() {
1277
+ var ρσ_anonfunc = function () {
1278
+ return this.jsset.size;
1279
+ };
1280
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1281
+ __module__ : {value: "__main__"}
1282
+ });
1283
+ return ρσ_anonfunc;
1284
+ })();
1064
1285
  ρσ_set.prototype.has = ρσ_set.prototype.__contains__ = (function() {
1065
1286
  var ρσ_anonfunc = function (x) {
1066
1287
  return this.jsset.has(x);
1067
1288
  };
1068
1289
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1069
- __argnames__ : {value: ["x"]}
1290
+ __argnames__ : {value: ["x"]},
1291
+ __module__ : {value: "__main__"}
1070
1292
  });
1071
1293
  return ρσ_anonfunc;
1072
1294
  })();
@@ -1075,151 +1297,197 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1075
1297
  this.jsset.add(x);
1076
1298
  };
1077
1299
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1078
- __argnames__ : {value: ["x"]}
1300
+ __argnames__ : {value: ["x"]},
1301
+ __module__ : {value: "__main__"}
1302
+ });
1303
+ return ρσ_anonfunc;
1304
+ })();
1305
+ ρσ_set.prototype.clear = (function() {
1306
+ var ρσ_anonfunc = function () {
1307
+ this.jsset.clear();
1308
+ };
1309
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1310
+ __module__ : {value: "__main__"}
1311
+ });
1312
+ return ρσ_anonfunc;
1313
+ })();
1314
+ ρσ_set.prototype.copy = (function() {
1315
+ var ρσ_anonfunc = function () {
1316
+ return ρσ_set(this);
1317
+ };
1318
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1319
+ __module__ : {value: "__main__"}
1079
1320
  });
1080
1321
  return ρσ_anonfunc;
1081
1322
  })();
1082
- ρσ_set.prototype.clear = function () {
1083
- this.jsset.clear();
1084
- };
1085
- ρσ_set.prototype.copy = function () {
1086
- return ρσ_set(this);
1087
- };
1088
1323
  ρσ_set.prototype.discard = (function() {
1089
1324
  var ρσ_anonfunc = function (x) {
1090
1325
  this.jsset.delete(x);
1091
1326
  };
1092
1327
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1093
- __argnames__ : {value: ["x"]}
1328
+ __argnames__ : {value: ["x"]},
1329
+ __module__ : {value: "__main__"}
1094
1330
  });
1095
1331
  return ρσ_anonfunc;
1096
1332
  })();
1097
- ρσ_set.prototype[ρσ_iterator_symbol] = function () {
1098
- return this.jsset.values();
1099
- };
1100
- ρσ_set.prototype.difference = function () {
1101
- var ans, s, iterator, r, x, has;
1102
- ans = new ρσ_set;
1103
- s = ans.jsset;
1104
- iterator = this.jsset.values();
1105
- r = iterator.next();
1106
- while (!r.done) {
1107
- x = r.value;
1108
- has = false;
1109
- for (var i = 0; i < arguments.length; i++) {
1110
- if (arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1111
- has = true;
1112
- break;
1113
- }
1114
- }
1115
- if (!has) {
1116
- s.add(x);
1117
- }
1118
- r = iterator.next();
1119
- }
1120
- return ans;
1121
- };
1122
- ρσ_set.prototype.difference_update = function () {
1123
- var s, remove, iterator, r, x;
1124
- s = this.jsset;
1125
- remove = [];
1126
- iterator = s.values();
1127
- r = iterator.next();
1128
- while (!r.done) {
1129
- x = r.value;
1130
- for (var i = 0; i < arguments.length; i++) {
1131
- if (arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1132
- remove.push(x);
1133
- break;
1134
- }
1135
- }
1136
- r = iterator.next();
1137
- }
1138
- for (var j = 0; j < remove.length; j++) {
1139
- s.delete(remove[(typeof j === "number" && j < 0) ? remove.length + j : j]);
1140
- }
1141
- };
1142
- ρσ_set.prototype.intersection = function () {
1143
- var ans, s, iterator, r, x, has;
1144
- ans = new ρσ_set;
1145
- s = ans.jsset;
1146
- iterator = this.jsset.values();
1147
- r = iterator.next();
1148
- while (!r.done) {
1149
- x = r.value;
1150
- has = true;
1151
- for (var i = 0; i < arguments.length; i++) {
1152
- if (!arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1153
- has = false;
1154
- break;
1155
- }
1156
- }
1157
- if (has) {
1158
- s.add(x);
1159
- }
1160
- r = iterator.next();
1161
- }
1162
- return ans;
1163
- };
1164
- ρσ_set.prototype.intersection_update = function () {
1165
- var s, remove, iterator, r, x;
1166
- s = this.jsset;
1167
- remove = [];
1168
- iterator = s.values();
1169
- r = iterator.next();
1170
- while (!r.done) {
1171
- x = r.value;
1172
- for (var i = 0; i < arguments.length; i++) {
1173
- if (!arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1174
- remove.push(x);
1175
- break;
1176
- }
1177
- }
1178
- r = iterator.next();
1179
- }
1180
- for (var j = 0; j < remove.length; j++) {
1181
- s.delete(remove[(typeof j === "number" && j < 0) ? remove.length + j : j]);
1182
- }
1183
- };
1184
- ρσ_set.prototype.isdisjoint = (function() {
1185
- var ρσ_anonfunc = function (other) {
1186
- var iterator, r, x;
1333
+ ρσ_set.prototype[ρσ_iterator_symbol] = (function() {
1334
+ var ρσ_anonfunc = function () {
1335
+ return this.jsset.values();
1336
+ };
1337
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1338
+ __module__ : {value: "__main__"}
1339
+ });
1340
+ return ρσ_anonfunc;
1341
+ })();
1342
+ ρσ_set.prototype.difference = (function() {
1343
+ var ρσ_anonfunc = function () {
1344
+ var ans, s, iterator, r, x, has;
1345
+ ans = new ρσ_set;
1346
+ s = ans.jsset;
1187
1347
  iterator = this.jsset.values();
1188
1348
  r = iterator.next();
1189
1349
  while (!r.done) {
1190
1350
  x = r.value;
1191
- if (other.has(x)) {
1192
- return false;
1351
+ has = false;
1352
+ for (var i = 0; i < arguments.length; i++) {
1353
+ if (arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1354
+ has = true;
1355
+ break;
1356
+ }
1357
+ }
1358
+ if (!has) {
1359
+ s.add(x);
1193
1360
  }
1194
1361
  r = iterator.next();
1195
1362
  }
1196
- return true;
1363
+ return ans;
1197
1364
  };
1198
- if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1199
- __argnames__ : {value: ["other"]}
1365
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1366
+ __module__ : {value: "__main__"}
1200
1367
  });
1201
1368
  return ρσ_anonfunc;
1202
1369
  })();
1203
- ρσ_set.prototype.issubset = (function() {
1204
- var ρσ_anonfunc = function (other) {
1205
- var iterator, r, x;
1206
- iterator = this.jsset.values();
1370
+ ρσ_set.prototype.difference_update = (function() {
1371
+ var ρσ_anonfunc = function () {
1372
+ var s, remove, iterator, r, x;
1373
+ s = this.jsset;
1374
+ remove = [];
1375
+ iterator = s.values();
1207
1376
  r = iterator.next();
1208
1377
  while (!r.done) {
1209
1378
  x = r.value;
1210
- if (!other.has(x)) {
1211
- return false;
1379
+ for (var i = 0; i < arguments.length; i++) {
1380
+ if (arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1381
+ remove.push(x);
1382
+ break;
1383
+ }
1212
1384
  }
1213
1385
  r = iterator.next();
1214
1386
  }
1215
- return true;
1387
+ for (var j = 0; j < remove.length; j++) {
1388
+ s.delete(remove[(typeof j === "number" && j < 0) ? remove.length + j : j]);
1389
+ }
1216
1390
  };
1217
- if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1218
- __argnames__ : {value: ["other"]}
1391
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1392
+ __module__ : {value: "__main__"}
1219
1393
  });
1220
1394
  return ρσ_anonfunc;
1221
1395
  })();
1222
- ρσ_set.prototype.issuperset = (function() {
1396
+ ρσ_set.prototype.intersection = (function() {
1397
+ var ρσ_anonfunc = function () {
1398
+ var ans, s, iterator, r, x, has;
1399
+ ans = new ρσ_set;
1400
+ s = ans.jsset;
1401
+ iterator = this.jsset.values();
1402
+ r = iterator.next();
1403
+ while (!r.done) {
1404
+ x = r.value;
1405
+ has = true;
1406
+ for (var i = 0; i < arguments.length; i++) {
1407
+ if (!arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1408
+ has = false;
1409
+ break;
1410
+ }
1411
+ }
1412
+ if (has) {
1413
+ s.add(x);
1414
+ }
1415
+ r = iterator.next();
1416
+ }
1417
+ return ans;
1418
+ };
1419
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1420
+ __module__ : {value: "__main__"}
1421
+ });
1422
+ return ρσ_anonfunc;
1423
+ })();
1424
+ ρσ_set.prototype.intersection_update = (function() {
1425
+ var ρσ_anonfunc = function () {
1426
+ var s, remove, iterator, r, x;
1427
+ s = this.jsset;
1428
+ remove = [];
1429
+ iterator = s.values();
1430
+ r = iterator.next();
1431
+ while (!r.done) {
1432
+ x = r.value;
1433
+ for (var i = 0; i < arguments.length; i++) {
1434
+ if (!arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i].has(x)) {
1435
+ remove.push(x);
1436
+ break;
1437
+ }
1438
+ }
1439
+ r = iterator.next();
1440
+ }
1441
+ for (var j = 0; j < remove.length; j++) {
1442
+ s.delete(remove[(typeof j === "number" && j < 0) ? remove.length + j : j]);
1443
+ }
1444
+ };
1445
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1446
+ __module__ : {value: "__main__"}
1447
+ });
1448
+ return ρσ_anonfunc;
1449
+ })();
1450
+ ρσ_set.prototype.isdisjoint = (function() {
1451
+ var ρσ_anonfunc = function (other) {
1452
+ var iterator, r, x;
1453
+ iterator = this.jsset.values();
1454
+ r = iterator.next();
1455
+ while (!r.done) {
1456
+ x = r.value;
1457
+ if (other.has(x)) {
1458
+ return false;
1459
+ }
1460
+ r = iterator.next();
1461
+ }
1462
+ return true;
1463
+ };
1464
+ if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1465
+ __argnames__ : {value: ["other"]},
1466
+ __module__ : {value: "__main__"}
1467
+ });
1468
+ return ρσ_anonfunc;
1469
+ })();
1470
+ ρσ_set.prototype.issubset = (function() {
1471
+ var ρσ_anonfunc = function (other) {
1472
+ var iterator, r, x;
1473
+ iterator = this.jsset.values();
1474
+ r = iterator.next();
1475
+ while (!r.done) {
1476
+ x = r.value;
1477
+ if (!other.has(x)) {
1478
+ return false;
1479
+ }
1480
+ r = iterator.next();
1481
+ }
1482
+ return true;
1483
+ };
1484
+ if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1485
+ __argnames__ : {value: ["other"]},
1486
+ __module__ : {value: "__main__"}
1487
+ });
1488
+ return ρσ_anonfunc;
1489
+ })();
1490
+ ρσ_set.prototype.issuperset = (function() {
1223
1491
  var ρσ_anonfunc = function (other) {
1224
1492
  var s, iterator, r, x;
1225
1493
  s = this.jsset;
@@ -1235,20 +1503,27 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1235
1503
  return true;
1236
1504
  };
1237
1505
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1238
- __argnames__ : {value: ["other"]}
1506
+ __argnames__ : {value: ["other"]},
1507
+ __module__ : {value: "__main__"}
1508
+ });
1509
+ return ρσ_anonfunc;
1510
+ })();
1511
+ ρσ_set.prototype.pop = (function() {
1512
+ var ρσ_anonfunc = function () {
1513
+ var iterator, r;
1514
+ iterator = this.jsset.values();
1515
+ r = iterator.next();
1516
+ if (r.done) {
1517
+ throw new KeyError("pop from an empty set");
1518
+ }
1519
+ this.jsset.delete(r.value);
1520
+ return r.value;
1521
+ };
1522
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1523
+ __module__ : {value: "__main__"}
1239
1524
  });
1240
1525
  return ρσ_anonfunc;
1241
1526
  })();
1242
- ρσ_set.prototype.pop = function () {
1243
- var iterator, r;
1244
- iterator = this.jsset.values();
1245
- r = iterator.next();
1246
- if (r.done) {
1247
- throw new KeyError("pop from an empty set");
1248
- }
1249
- this.jsset.delete(r.value);
1250
- return r.value;
1251
- };
1252
1527
  ρσ_set.prototype.remove = (function() {
1253
1528
  var ρσ_anonfunc = function (x) {
1254
1529
  if (!this.jsset.delete(x)) {
@@ -1256,7 +1531,8 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1256
1531
  }
1257
1532
  };
1258
1533
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1259
- __argnames__ : {value: ["x"]}
1534
+ __argnames__ : {value: ["x"]},
1535
+ __module__ : {value: "__main__"}
1260
1536
  });
1261
1537
  return ρσ_anonfunc;
1262
1538
  })();
@@ -1265,7 +1541,8 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1265
1541
  return this.union(other).difference(this.intersection(other));
1266
1542
  };
1267
1543
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1268
- __argnames__ : {value: ["other"]}
1544
+ __argnames__ : {value: ["other"]},
1545
+ __module__ : {value: "__main__"}
1269
1546
  });
1270
1547
  return ρσ_anonfunc;
1271
1548
  })();
@@ -1277,31 +1554,50 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1277
1554
  this.difference_update(common);
1278
1555
  };
1279
1556
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1280
- __argnames__ : {value: ["other"]}
1557
+ __argnames__ : {value: ["other"]},
1558
+ __module__ : {value: "__main__"}
1281
1559
  });
1282
1560
  return ρσ_anonfunc;
1283
1561
  })();
1284
- ρσ_set.prototype.union = function () {
1285
- var ans;
1286
- ans = ρσ_set(this);
1287
- ans.update.apply(ans, arguments);
1288
- return ans;
1289
- };
1290
- ρσ_set.prototype.update = function () {
1291
- var s, iterator, r;
1292
- s = this.jsset;
1293
- for (var i=0; i < arguments.length; i++) {
1294
- iterator = arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i][ρσ_iterator_symbol]();
1295
- r = iterator.next();
1296
- while (!r.done) {
1297
- s.add(r.value);
1562
+ ρσ_set.prototype.union = (function() {
1563
+ var ρσ_anonfunc = function () {
1564
+ var ans;
1565
+ ans = ρσ_set(this);
1566
+ ans.update.apply(ans, arguments);
1567
+ return ans;
1568
+ };
1569
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1570
+ __module__ : {value: "__main__"}
1571
+ });
1572
+ return ρσ_anonfunc;
1573
+ })();
1574
+ ρσ_set.prototype.update = (function() {
1575
+ var ρσ_anonfunc = function () {
1576
+ var s, iterator, r;
1577
+ s = this.jsset;
1578
+ for (var i=0; i < arguments.length; i++) {
1579
+ iterator = arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i][ρσ_iterator_symbol]();
1298
1580
  r = iterator.next();
1581
+ while (!r.done) {
1582
+ s.add(r.value);
1583
+ r = iterator.next();
1584
+ }
1299
1585
  }
1300
- }
1301
- };
1302
- ρσ_set.prototype.toString = ρσ_set.prototype.inspect = function () {
1303
- return "{" + list(this).join(", ") + "}";
1304
- };
1586
+ };
1587
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1588
+ __module__ : {value: "__main__"}
1589
+ });
1590
+ return ρσ_anonfunc;
1591
+ })();
1592
+ ρσ_set.prototype.toString = ρσ_set.prototype.__repr__ = ρσ_set.prototype.__str__ = ρσ_set.prototype.inspect = (function() {
1593
+ var ρσ_anonfunc = function () {
1594
+ return "{" + list(this).join(", ") + "}";
1595
+ };
1596
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1597
+ __module__ : {value: "__main__"}
1598
+ });
1599
+ return ρσ_anonfunc;
1600
+ })();
1305
1601
  ρσ_set.prototype.__eq__ = (function() {
1306
1602
  var ρσ_anonfunc = function (other) {
1307
1603
  var iterator, r;
@@ -1325,7 +1621,8 @@ Object.defineProperties(ρσ_set.prototype, (function(){
1325
1621
  return true;
1326
1622
  };
1327
1623
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1328
- __argnames__ : {value: ["other"]}
1624
+ __argnames__ : {value: ["other"]},
1625
+ __module__ : {value: "__main__"}
1329
1626
  });
1330
1627
  return ρσ_anonfunc;
1331
1628
  })();
@@ -1336,7 +1633,8 @@ function ρσ_set_wrap(x) {
1336
1633
  return ans;
1337
1634
  };
1338
1635
  if (!ρσ_set_wrap.__argnames__) Object.defineProperties(ρσ_set_wrap, {
1339
- __argnames__ : {value: ["x"]}
1636
+ __argnames__ : {value: ["x"]},
1637
+ __module__ : {value: "__main__"}
1340
1638
  });
1341
1639
 
1342
1640
  var set = ρσ_set, set_wrap = ρσ_set_wrap;
@@ -1345,6 +1643,9 @@ function ρσ_dict_polyfill() {
1345
1643
  this._store = {};
1346
1644
  this.size = 0;
1347
1645
  };
1646
+ if (!ρσ_dict_polyfill.__module__) Object.defineProperties(ρσ_dict_polyfill, {
1647
+ __module__ : {value: "__main__"}
1648
+ });
1348
1649
 
1349
1650
  ρσ_dict_polyfill.prototype.set = (function() {
1350
1651
  var ρσ_anonfunc = function (x, value) {
@@ -1357,7 +1658,8 @@ function ρσ_dict_polyfill() {
1357
1658
  return this;
1358
1659
  };
1359
1660
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1360
- __argnames__ : {value: ["x", "value"]}
1661
+ __argnames__ : {value: ["x", "value"]},
1662
+ __module__ : {value: "__main__"}
1361
1663
  });
1362
1664
  return ρσ_anonfunc;
1363
1665
  })();
@@ -1367,7 +1669,8 @@ function ρσ_dict_polyfill() {
1367
1669
  this.size = 0;
1368
1670
  };
1369
1671
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1370
- __argnames__ : {value: ["x"]}
1672
+ __argnames__ : {value: ["x"]},
1673
+ __module__ : {value: "__main__"}
1371
1674
  });
1372
1675
  return ρσ_anonfunc;
1373
1676
  })();
@@ -1383,7 +1686,8 @@ function ρσ_dict_polyfill() {
1383
1686
  return false;
1384
1687
  };
1385
1688
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1386
- __argnames__ : {value: ["x"]}
1689
+ __argnames__ : {value: ["x"]},
1690
+ __module__ : {value: "__main__"}
1387
1691
  });
1388
1692
  return ρσ_anonfunc;
1389
1693
  })();
@@ -1392,7 +1696,8 @@ function ρσ_dict_polyfill() {
1392
1696
  return Object.prototype.hasOwnProperty.call(this._store, ρσ_set_keyfor(x));
1393
1697
  };
1394
1698
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1395
- __argnames__ : {value: ["x"]}
1699
+ __argnames__ : {value: ["x"]},
1700
+ __module__ : {value: "__main__"}
1396
1701
  });
1397
1702
  return ρσ_anonfunc;
1398
1703
  })();
@@ -1410,7 +1715,8 @@ function ρσ_dict_polyfill() {
1410
1715
  }
1411
1716
  };
1412
1717
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1413
- __argnames__ : {value: ["x"]}
1718
+ __argnames__ : {value: ["x"]},
1719
+ __module__ : {value: "__main__"}
1414
1720
  });
1415
1721
  return ρσ_anonfunc;
1416
1722
  })();
@@ -1418,20 +1724,33 @@ function ρσ_dict_polyfill() {
1418
1724
  var ρσ_anonfunc = function (x) {
1419
1725
  var ans;
1420
1726
  ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};
1421
- ans[ρσ_iterator_symbol] = function () {
1422
- return this;
1423
- };
1424
- ans["next"] = function () {
1425
- this._i += 1;
1426
- if (this._i >= this._keys.length) {
1427
- return {'done': true};
1428
- }
1429
- return {'done':false, 'value':this._s[this._keys[this._i]][1]};
1430
- };
1727
+ ans[ρσ_iterator_symbol] = (function() {
1728
+ var ρσ_anonfunc = function () {
1729
+ return this;
1730
+ };
1731
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1732
+ __module__ : {value: "__main__"}
1733
+ });
1734
+ return ρσ_anonfunc;
1735
+ })();
1736
+ ans["next"] = (function() {
1737
+ var ρσ_anonfunc = function () {
1738
+ this._i += 1;
1739
+ if (this._i >= this._keys.length) {
1740
+ return {'done': true};
1741
+ }
1742
+ return {'done':false, 'value':this._s[this._keys[this._i]][1]};
1743
+ };
1744
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1745
+ __module__ : {value: "__main__"}
1746
+ });
1747
+ return ρσ_anonfunc;
1748
+ })();
1431
1749
  return ans;
1432
1750
  };
1433
1751
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1434
- __argnames__ : {value: ["x"]}
1752
+ __argnames__ : {value: ["x"]},
1753
+ __module__ : {value: "__main__"}
1435
1754
  });
1436
1755
  return ρσ_anonfunc;
1437
1756
  })();
@@ -1439,20 +1758,33 @@ function ρσ_dict_polyfill() {
1439
1758
  var ρσ_anonfunc = function (x) {
1440
1759
  var ans;
1441
1760
  ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};
1442
- ans[ρσ_iterator_symbol] = function () {
1443
- return this;
1444
- };
1445
- ans["next"] = function () {
1446
- this._i += 1;
1447
- if (this._i >= this._keys.length) {
1448
- return {'done': true};
1449
- }
1450
- return {'done':false, 'value':this._s[this._keys[this._i]][0]};
1451
- };
1761
+ ans[ρσ_iterator_symbol] = (function() {
1762
+ var ρσ_anonfunc = function () {
1763
+ return this;
1764
+ };
1765
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1766
+ __module__ : {value: "__main__"}
1767
+ });
1768
+ return ρσ_anonfunc;
1769
+ })();
1770
+ ans["next"] = (function() {
1771
+ var ρσ_anonfunc = function () {
1772
+ this._i += 1;
1773
+ if (this._i >= this._keys.length) {
1774
+ return {'done': true};
1775
+ }
1776
+ return {'done':false, 'value':this._s[this._keys[this._i]][0]};
1777
+ };
1778
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1779
+ __module__ : {value: "__main__"}
1780
+ });
1781
+ return ρσ_anonfunc;
1782
+ })();
1452
1783
  return ans;
1453
1784
  };
1454
1785
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1455
- __argnames__ : {value: ["x"]}
1786
+ __argnames__ : {value: ["x"]},
1787
+ __module__ : {value: "__main__"}
1456
1788
  });
1457
1789
  return ρσ_anonfunc;
1458
1790
  })();
@@ -1460,20 +1792,33 @@ function ρσ_dict_polyfill() {
1460
1792
  var ρσ_anonfunc = function (x) {
1461
1793
  var ans;
1462
1794
  ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};
1463
- ans[ρσ_iterator_symbol] = function () {
1464
- return this;
1465
- };
1466
- ans["next"] = function () {
1467
- this._i += 1;
1468
- if (this._i >= this._keys.length) {
1469
- return {'done': true};
1470
- }
1471
- return {'done':false, 'value':this._s[this._keys[this._i]]};
1472
- };
1795
+ ans[ρσ_iterator_symbol] = (function() {
1796
+ var ρσ_anonfunc = function () {
1797
+ return this;
1798
+ };
1799
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1800
+ __module__ : {value: "__main__"}
1801
+ });
1802
+ return ρσ_anonfunc;
1803
+ })();
1804
+ ans["next"] = (function() {
1805
+ var ρσ_anonfunc = function () {
1806
+ this._i += 1;
1807
+ if (this._i >= this._keys.length) {
1808
+ return {'done': true};
1809
+ }
1810
+ return {'done':false, 'value':this._s[this._keys[this._i]]};
1811
+ };
1812
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1813
+ __module__ : {value: "__main__"}
1814
+ });
1815
+ return ρσ_anonfunc;
1816
+ })();
1473
1817
  return ans;
1474
1818
  };
1475
1819
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1476
- __argnames__ : {value: ["x"]}
1820
+ __argnames__ : {value: ["x"]},
1821
+ __module__ : {value: "__main__"}
1477
1822
  });
1478
1823
  return ρσ_anonfunc;
1479
1824
  })();
@@ -1499,7 +1844,8 @@ function ρσ_dict() {
1499
1844
  };
1500
1845
  if (!ρσ_dict.__handles_kwarg_interpolation__) Object.defineProperties(ρσ_dict, {
1501
1846
  __handles_kwarg_interpolation__ : {value: true},
1502
- __argnames__ : {value: ["iterable"]}
1847
+ __argnames__ : {value: ["iterable"]},
1848
+ __module__ : {value: "__main__"}
1503
1849
  });
1504
1850
 
1505
1851
  ρσ_dict.prototype.__name__ = "dict";
@@ -1507,29 +1853,48 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1507
1853
  var ρσ_d = {};
1508
1854
  ρσ_d["length"] = (function(){
1509
1855
  var ρσ_d = {};
1510
- ρσ_d["get"] = function () {
1511
- return this.jsmap.size;
1512
- };
1856
+ ρσ_d["get"] = (function() {
1857
+ var ρσ_anonfunc = function () {
1858
+ return this.jsmap.size;
1859
+ };
1860
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1861
+ __module__ : {value: "__main__"}
1862
+ });
1863
+ return ρσ_anonfunc;
1864
+ })();
1513
1865
  return ρσ_d;
1514
1866
  }).call(this);
1515
1867
  ρσ_d["size"] = (function(){
1516
1868
  var ρσ_d = {};
1517
- ρσ_d["get"] = function () {
1518
- return this.jsmap.size;
1519
- };
1869
+ ρσ_d["get"] = (function() {
1870
+ var ρσ_anonfunc = function () {
1871
+ return this.jsmap.size;
1872
+ };
1873
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1874
+ __module__ : {value: "__main__"}
1875
+ });
1876
+ return ρσ_anonfunc;
1877
+ })();
1520
1878
  return ρσ_d;
1521
1879
  }).call(this);
1522
1880
  return ρσ_d;
1523
1881
  }).call(this));
1524
- ρσ_dict.prototype.__len__ = function () {
1525
- return this.jsmap.size;
1526
- };
1882
+ ρσ_dict.prototype.__len__ = (function() {
1883
+ var ρσ_anonfunc = function () {
1884
+ return this.jsmap.size;
1885
+ };
1886
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1887
+ __module__ : {value: "__main__"}
1888
+ });
1889
+ return ρσ_anonfunc;
1890
+ })();
1527
1891
  ρσ_dict.prototype.has = ρσ_dict.prototype.__contains__ = (function() {
1528
1892
  var ρσ_anonfunc = function (x) {
1529
1893
  return this.jsmap.has(x);
1530
1894
  };
1531
1895
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1532
- __argnames__ : {value: ["x"]}
1896
+ __argnames__ : {value: ["x"]},
1897
+ __module__ : {value: "__main__"}
1533
1898
  });
1534
1899
  return ρσ_anonfunc;
1535
1900
  })();
@@ -1538,7 +1903,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1538
1903
  this.jsmap.set(key, value);
1539
1904
  };
1540
1905
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1541
- __argnames__ : {value: ["key", "value"]}
1906
+ __argnames__ : {value: ["key", "value"]},
1907
+ __module__ : {value: "__main__"}
1542
1908
  });
1543
1909
  return ρσ_anonfunc;
1544
1910
  })();
@@ -1547,28 +1913,65 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1547
1913
  this.jsmap.delete(key);
1548
1914
  };
1549
1915
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1550
- __argnames__ : {value: ["key"]}
1916
+ __argnames__ : {value: ["key"]},
1917
+ __module__ : {value: "__main__"}
1918
+ });
1919
+ return ρσ_anonfunc;
1920
+ })();
1921
+ ρσ_dict.prototype.clear = (function() {
1922
+ var ρσ_anonfunc = function () {
1923
+ this.jsmap.clear();
1924
+ };
1925
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1926
+ __module__ : {value: "__main__"}
1927
+ });
1928
+ return ρσ_anonfunc;
1929
+ })();
1930
+ ρσ_dict.prototype.copy = (function() {
1931
+ var ρσ_anonfunc = function () {
1932
+ return ρσ_dict(this);
1933
+ };
1934
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1935
+ __module__ : {value: "__main__"}
1936
+ });
1937
+ return ρσ_anonfunc;
1938
+ })();
1939
+ ρσ_dict.prototype.keys = (function() {
1940
+ var ρσ_anonfunc = function () {
1941
+ return this.jsmap.keys();
1942
+ };
1943
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1944
+ __module__ : {value: "__main__"}
1945
+ });
1946
+ return ρσ_anonfunc;
1947
+ })();
1948
+ ρσ_dict.prototype.values = (function() {
1949
+ var ρσ_anonfunc = function () {
1950
+ return this.jsmap.values();
1951
+ };
1952
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1953
+ __module__ : {value: "__main__"}
1954
+ });
1955
+ return ρσ_anonfunc;
1956
+ })();
1957
+ ρσ_dict.prototype.items = ρσ_dict.prototype.entries = (function() {
1958
+ var ρσ_anonfunc = function () {
1959
+ return this.jsmap.entries();
1960
+ };
1961
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1962
+ __module__ : {value: "__main__"}
1963
+ });
1964
+ return ρσ_anonfunc;
1965
+ })();
1966
+ ρσ_dict.prototype[ρσ_iterator_symbol] = (function() {
1967
+ var ρσ_anonfunc = function () {
1968
+ return this.jsmap.keys();
1969
+ };
1970
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
1971
+ __module__ : {value: "__main__"}
1551
1972
  });
1552
1973
  return ρσ_anonfunc;
1553
1974
  })();
1554
- ρσ_dict.prototype.clear = function () {
1555
- this.jsmap.clear();
1556
- };
1557
- ρσ_dict.prototype.copy = function () {
1558
- return ρσ_dict(this);
1559
- };
1560
- ρσ_dict.prototype.keys = function () {
1561
- return this.jsmap.keys();
1562
- };
1563
- ρσ_dict.prototype.values = function () {
1564
- return this.jsmap.values();
1565
- };
1566
- ρσ_dict.prototype.items = ρσ_dict.prototype.entries = function () {
1567
- return this.jsmap.entries();
1568
- };
1569
- ρσ_dict.prototype[ρσ_iterator_symbol] = function () {
1570
- return this.jsmap.keys();
1571
- };
1572
1975
  ρσ_dict.prototype.__getitem__ = (function() {
1573
1976
  var ρσ_anonfunc = function (key) {
1574
1977
  var ans;
@@ -1579,7 +1982,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1579
1982
  return ans;
1580
1983
  };
1581
1984
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1582
- __argnames__ : {value: ["key"]}
1985
+ __argnames__ : {value: ["key"]},
1986
+ __module__ : {value: "__main__"}
1583
1987
  });
1584
1988
  return ρσ_anonfunc;
1585
1989
  })();
@@ -1593,7 +1997,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1593
1997
  return ans;
1594
1998
  };
1595
1999
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1596
- __argnames__ : {value: ["key", "defval"]}
2000
+ __argnames__ : {value: ["key", "defval"]},
2001
+ __module__ : {value: "__main__"}
1597
2002
  });
1598
2003
  return ρσ_anonfunc;
1599
2004
  })();
@@ -1608,7 +2013,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1608
2013
  return j.get(key);
1609
2014
  };
1610
2015
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1611
- __argnames__ : {value: ["key", "defval"]}
2016
+ __argnames__ : {value: ["key", "defval"]},
2017
+ __module__ : {value: "__main__"}
1612
2018
  });
1613
2019
  return ρσ_anonfunc;
1614
2020
  })();
@@ -1634,7 +2040,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1634
2040
  if (!ρσ_anonfunc.__defaults__) Object.defineProperties(ρσ_anonfunc, {
1635
2041
  __defaults__ : {value: {value:null}},
1636
2042
  __handles_kwarg_interpolation__ : {value: true},
1637
- __argnames__ : {value: ["iterable", "value"]}
2043
+ __argnames__ : {value: ["iterable", "value"]},
2044
+ __module__ : {value: "__main__"}
1638
2045
  });
1639
2046
  return ρσ_anonfunc;
1640
2047
  })();
@@ -1652,74 +2059,100 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1652
2059
  return ans;
1653
2060
  };
1654
2061
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1655
- __argnames__ : {value: ["key", "defval"]}
2062
+ __argnames__ : {value: ["key", "defval"]},
2063
+ __module__ : {value: "__main__"}
1656
2064
  });
1657
2065
  return ρσ_anonfunc;
1658
2066
  })();
1659
- ρσ_dict.prototype.popitem = function () {
1660
- var r;
1661
- r = this.jsmap.entries().next();
1662
- if (r.done) {
1663
- throw new KeyError("dict is empty");
1664
- }
1665
- this.jsmap.delete(r.value[0]);
1666
- return r.value;
1667
- };
1668
- ρσ_dict.prototype.update = function () {
1669
- var m, iterable, iterator, result, keys;
1670
- if (arguments.length === 0) {
1671
- return;
1672
- }
1673
- m = this.jsmap;
1674
- iterable = arguments[0];
1675
- if (Array.isArray(iterable)) {
1676
- for (var i = 0; i < iterable.length; i++) {
1677
- m.set(iterable[(typeof i === "number" && i < 0) ? iterable.length + i : i][0], iterable[(typeof i === "number" && i < 0) ? iterable.length + i : i][1]);
2067
+ ρσ_dict.prototype.popitem = (function() {
2068
+ var ρσ_anonfunc = function () {
2069
+ var last, e, r;
2070
+ last = null;
2071
+ e = this.jsmap.entries();
2072
+ while (true) {
2073
+ r = e.next();
2074
+ if (r.done) {
2075
+ if (last === null) {
2076
+ throw new KeyError("dict is empty");
2077
+ }
2078
+ this.jsmap.delete(last.value[0]);
2079
+ return last.value;
2080
+ }
2081
+ last = r;
1678
2082
  }
1679
- } else if (iterable instanceof ρσ_dict) {
1680
- iterator = iterable.items();
1681
- result = iterator.next();
1682
- while (!result.done) {
1683
- m.set(result.value[0], result.value[1]);
1684
- result = iterator.next();
2083
+ };
2084
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2085
+ __module__ : {value: "__main__"}
2086
+ });
2087
+ return ρσ_anonfunc;
2088
+ })();
2089
+ ρσ_dict.prototype.update = (function() {
2090
+ var ρσ_anonfunc = function () {
2091
+ var m, iterable, iterator, result, keys;
2092
+ if (arguments.length === 0) {
2093
+ return;
1685
2094
  }
1686
- } else if (typeof Map === "function" && iterable instanceof Map) {
1687
- iterator = iterable.entries();
1688
- result = iterator.next();
1689
- while (!result.done) {
1690
- m.set(result.value[0], result.value[1]);
2095
+ m = this.jsmap;
2096
+ iterable = arguments[0];
2097
+ if (Array.isArray(iterable)) {
2098
+ for (var i = 0; i < iterable.length; i++) {
2099
+ m.set(iterable[(typeof i === "number" && i < 0) ? iterable.length + i : i][0], iterable[(typeof i === "number" && i < 0) ? iterable.length + i : i][1]);
2100
+ }
2101
+ } else if (iterable instanceof ρσ_dict) {
2102
+ iterator = iterable.items();
1691
2103
  result = iterator.next();
1692
- }
1693
- } else if (typeof iterable[ρσ_iterator_symbol] === "function") {
1694
- iterator = iterable[ρσ_iterator_symbol]();
1695
- result = iterator.next();
1696
- while (!result.done) {
1697
- m.set(result.value[0], result.value[1]);
2104
+ while (!result.done) {
2105
+ m.set(result.value[0], result.value[1]);
2106
+ result = iterator.next();
2107
+ }
2108
+ } else if (typeof Map === "function" && iterable instanceof Map) {
2109
+ iterator = iterable.entries();
1698
2110
  result = iterator.next();
1699
- }
1700
- } else {
1701
- keys = Object.keys(iterable);
1702
- for (var j=0; j < keys.length; j++) {
1703
- if (keys[(typeof j === "number" && j < 0) ? keys.length + j : j] !== ρσ_iterator_symbol) {
1704
- m.set(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], iterable[ρσ_bound_index(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], iterable)]);
2111
+ while (!result.done) {
2112
+ m.set(result.value[0], result.value[1]);
2113
+ result = iterator.next();
2114
+ }
2115
+ } else if (typeof iterable[ρσ_iterator_symbol] === "function") {
2116
+ iterator = iterable[ρσ_iterator_symbol]();
2117
+ result = iterator.next();
2118
+ while (!result.done) {
2119
+ m.set(result.value[0], result.value[1]);
2120
+ result = iterator.next();
2121
+ }
2122
+ } else {
2123
+ keys = Object.keys(iterable);
2124
+ for (var j=0; j < keys.length; j++) {
2125
+ if (keys[(typeof j === "number" && j < 0) ? keys.length + j : j] !== ρσ_iterator_symbol) {
2126
+ m.set(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], iterable[ρσ_bound_index(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], iterable)]);
2127
+ }
1705
2128
  }
1706
2129
  }
1707
- }
1708
- if (arguments.length > 1) {
1709
- ρσ_dict.prototype.update.call(this, arguments[1]);
1710
- }
1711
- };
1712
- ρσ_dict.prototype.toString = ρσ_dict.prototype.inspect = ρσ_dict.prototype.__str__ = ρσ_dict.prototype.__repr__ = function () {
1713
- var entries, iterator, r;
1714
- entries = [];
1715
- iterator = this.jsmap.entries();
1716
- r = iterator.next();
1717
- while (!r.done) {
1718
- entries.push(ρσ_repr(r.value[0]) + ": " + ρσ_repr(r.value[1]));
2130
+ if (arguments.length > 1) {
2131
+ ρσ_dict.prototype.update.call(this, arguments[1]);
2132
+ }
2133
+ };
2134
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2135
+ __module__ : {value: "__main__"}
2136
+ });
2137
+ return ρσ_anonfunc;
2138
+ })();
2139
+ ρσ_dict.prototype.toString = ρσ_dict.prototype.inspect = ρσ_dict.prototype.__str__ = ρσ_dict.prototype.__repr__ = (function() {
2140
+ var ρσ_anonfunc = function () {
2141
+ var entries, iterator, r;
2142
+ entries = [];
2143
+ iterator = this.jsmap.entries();
1719
2144
  r = iterator.next();
1720
- }
1721
- return "{" + entries.join(", ") + "}";
1722
- };
2145
+ while (!r.done) {
2146
+ entries.push(ρσ_repr(r.value[0]) + ": " + ρσ_repr(r.value[1]));
2147
+ r = iterator.next();
2148
+ }
2149
+ return "{" + entries.join(", ") + "}";
2150
+ };
2151
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2152
+ __module__ : {value: "__main__"}
2153
+ });
2154
+ return ρσ_anonfunc;
2155
+ })();
1723
2156
  ρσ_dict.prototype.__eq__ = (function() {
1724
2157
  var ρσ_anonfunc = function (other) {
1725
2158
  var iterator, r, x;
@@ -1744,7 +2177,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1744
2177
  return true;
1745
2178
  };
1746
2179
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1747
- __argnames__ : {value: ["other"]}
2180
+ __argnames__ : {value: ["other"]},
2181
+ __module__ : {value: "__main__"}
1748
2182
  });
1749
2183
  return ρσ_anonfunc;
1750
2184
  })();
@@ -1761,7 +2195,8 @@ Object.defineProperties(ρσ_dict.prototype, (function(){
1761
2195
  return ans;
1762
2196
  };
1763
2197
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1764
- __argnames__ : {value: ["other"]}
2198
+ __argnames__ : {value: ["other"]},
2199
+ __module__ : {value: "__main__"}
1765
2200
  });
1766
2201
  return ρσ_anonfunc;
1767
2202
  })();
@@ -1772,10 +2207,12 @@ function ρσ_dict_wrap(x) {
1772
2207
  return ans;
1773
2208
  };
1774
2209
  if (!ρσ_dict_wrap.__argnames__) Object.defineProperties(ρσ_dict_wrap, {
1775
- __argnames__ : {value: ["x"]}
2210
+ __argnames__ : {value: ["x"]},
2211
+ __module__ : {value: "__main__"}
1776
2212
  });
1777
2213
 
1778
- var dict = ρσ_dict, dict_wrap = ρσ_dict_wrap;var NameError;
2214
+ var dict = ρσ_dict, dict_wrap = ρσ_dict_wrap;// }}}
2215
+ var NameError;
1779
2216
  NameError = ReferenceError;
1780
2217
  function Exception() {
1781
2218
  if (this.ρσ_object_id === undefined) Object.defineProperty(this, "ρσ_object_id", {"value":++ρσ_object_counter});
@@ -1789,7 +2226,8 @@ Exception.prototype.__init__ = function __init__(message) {
1789
2226
  self.name = self.constructor.name;
1790
2227
  };
1791
2228
  if (!Exception.prototype.__init__.__argnames__) Object.defineProperties(Exception.prototype.__init__, {
1792
- __argnames__ : {value: ["message"]}
2229
+ __argnames__ : {value: ["message"]},
2230
+ __module__ : {value: "__main__"}
1793
2231
  });
1794
2232
  Exception.__argnames__ = Exception.prototype.__init__.__argnames__;
1795
2233
  Exception.__handles_kwarg_interpolation__ = Exception.prototype.__init__.__handles_kwarg_interpolation__;
@@ -1797,8 +2235,8 @@ Exception.prototype.__repr__ = function __repr__() {
1797
2235
  var self = this;
1798
2236
  return self.name + ": " + self.message;
1799
2237
  };
1800
- if (!Exception.prototype.__repr__.__argnames__) Object.defineProperties(Exception.prototype.__repr__, {
1801
- __argnames__ : {value: []}
2238
+ if (!Exception.prototype.__repr__.__module__) Object.defineProperties(Exception.prototype.__repr__, {
2239
+ __module__ : {value: "__main__"}
1802
2240
  });
1803
2241
  Exception.prototype.__str__ = function __str__ () {
1804
2242
  if(Error.prototype.__str__) return Error.prototype.__str__.call(this);
@@ -1966,7 +2404,8 @@ function ρσ_eslice(arr, step, start, end) {
1966
2404
  return i % step === 0;
1967
2405
  };
1968
2406
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
1969
- __argnames__ : {value: ["e", "i"]}
2407
+ __argnames__ : {value: ["e", "i"]},
2408
+ __module__ : {value: "__main__"}
1970
2409
  });
1971
2410
  return ρσ_anonfunc;
1972
2411
  })());
@@ -1976,7 +2415,8 @@ function ρσ_eslice(arr, step, start, end) {
1976
2415
  return arr;
1977
2416
  };
1978
2417
  if (!ρσ_eslice.__argnames__) Object.defineProperties(ρσ_eslice, {
1979
- __argnames__ : {value: ["arr", "step", "start", "end"]}
2418
+ __argnames__ : {value: ["arr", "step", "start", "end"]},
2419
+ __module__ : {value: "__main__"}
1980
2420
  });
1981
2421
 
1982
2422
  function ρσ_delslice(arr, step, start, end) {
@@ -2022,7 +2462,8 @@ function ρσ_delslice(arr, step, start, end) {
2022
2462
  return arr;
2023
2463
  };
2024
2464
  if (!ρσ_delslice.__argnames__) Object.defineProperties(ρσ_delslice, {
2025
- __argnames__ : {value: ["arr", "step", "start", "end"]}
2465
+ __argnames__ : {value: ["arr", "step", "start", "end"]},
2466
+ __module__ : {value: "__main__"}
2026
2467
  });
2027
2468
 
2028
2469
  function ρσ_flatten(arr) {
@@ -2039,7 +2480,8 @@ function ρσ_flatten(arr) {
2039
2480
  return ans;
2040
2481
  };
2041
2482
  if (!ρσ_flatten.__argnames__) Object.defineProperties(ρσ_flatten, {
2042
- __argnames__ : {value: ["arr"]}
2483
+ __argnames__ : {value: ["arr"]},
2484
+ __module__ : {value: "__main__"}
2043
2485
  });
2044
2486
 
2045
2487
  function ρσ_unpack_asarray(num, iterable) {
@@ -2059,7 +2501,8 @@ function ρσ_unpack_asarray(num, iterable) {
2059
2501
  return ans;
2060
2502
  };
2061
2503
  if (!ρσ_unpack_asarray.__argnames__) Object.defineProperties(ρσ_unpack_asarray, {
2062
- __argnames__ : {value: ["num", "iterable"]}
2504
+ __argnames__ : {value: ["num", "iterable"]},
2505
+ __module__ : {value: "__main__"}
2063
2506
  });
2064
2507
 
2065
2508
  function ρσ_extends(child, parent) {
@@ -2067,11 +2510,36 @@ function ρσ_extends(child, parent) {
2067
2510
  child.prototype.constructor = child;
2068
2511
  };
2069
2512
  if (!ρσ_extends.__argnames__) Object.defineProperties(ρσ_extends, {
2070
- __argnames__ : {value: ["child", "parent"]}
2513
+ __argnames__ : {value: ["child", "parent"]},
2514
+ __module__ : {value: "__main__"}
2071
2515
  });
2072
2516
 
2073
- ρσ_in = function () {
2074
- if (typeof Map === "function" && typeof Set === "function") {
2517
+ ρσ_in = (function() {
2518
+ var ρσ_anonfunc = function () {
2519
+ if (typeof Map === "function" && typeof Set === "function") {
2520
+ return (function() {
2521
+ var ρσ_anonfunc = function (val, arr) {
2522
+ if (typeof arr === "string") {
2523
+ return arr.indexOf(val) !== -1;
2524
+ }
2525
+ if (typeof arr.__contains__ === "function") {
2526
+ return arr.__contains__(val);
2527
+ }
2528
+ if (arr instanceof Map || arr instanceof Set) {
2529
+ return arr.has(val);
2530
+ }
2531
+ if (ρσ_arraylike(arr)) {
2532
+ return ρσ_list_contains.call(arr, val);
2533
+ }
2534
+ return Object.prototype.hasOwnProperty.call(arr, val);
2535
+ };
2536
+ if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2537
+ __argnames__ : {value: ["val", "arr"]},
2538
+ __module__ : {value: "__main__"}
2539
+ });
2540
+ return ρσ_anonfunc;
2541
+ })();
2542
+ }
2075
2543
  return (function() {
2076
2544
  var ρσ_anonfunc = function (val, arr) {
2077
2545
  if (typeof arr === "string") {
@@ -2080,39 +2548,23 @@ if (!ρσ_extends.__argnames__) Object.defineProperties(ρσ_extends, {
2080
2548
  if (typeof arr.__contains__ === "function") {
2081
2549
  return arr.__contains__(val);
2082
2550
  }
2083
- if (arr instanceof Map || arr instanceof Set) {
2084
- return arr.has(val);
2085
- }
2086
2551
  if (ρσ_arraylike(arr)) {
2087
2552
  return ρσ_list_contains.call(arr, val);
2088
2553
  }
2089
2554
  return Object.prototype.hasOwnProperty.call(arr, val);
2090
2555
  };
2091
2556
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2092
- __argnames__ : {value: ["val", "arr"]}
2557
+ __argnames__ : {value: ["val", "arr"]},
2558
+ __module__ : {value: "__main__"}
2093
2559
  });
2094
2560
  return ρσ_anonfunc;
2095
2561
  })();
2096
- }
2097
- return (function() {
2098
- var ρσ_anonfunc = function (val, arr) {
2099
- if (typeof arr === "string") {
2100
- return arr.indexOf(val) !== -1;
2101
- }
2102
- if (typeof arr.__contains__ === "function") {
2103
- return arr.__contains__(val);
2104
- }
2105
- if (ρσ_arraylike(arr)) {
2106
- return ρσ_list_contains.call(arr, val);
2107
- }
2108
- return Object.prototype.hasOwnProperty.call(arr, val);
2109
- };
2110
- if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2111
- __argnames__ : {value: ["val", "arr"]}
2112
- });
2113
- return ρσ_anonfunc;
2114
- })();
2115
- }();
2562
+ };
2563
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2564
+ __module__ : {value: "__main__"}
2565
+ });
2566
+ return ρσ_anonfunc;
2567
+ })()();
2116
2568
  function ρσ_Iterable(iterable) {
2117
2569
  var iterator, ans, result;
2118
2570
  if (ρσ_arraylike(iterable)) {
@@ -2131,34 +2583,53 @@ function ρσ_Iterable(iterable) {
2131
2583
  return Object.keys(iterable);
2132
2584
  };
2133
2585
  if (!ρσ_Iterable.__argnames__) Object.defineProperties(ρσ_Iterable, {
2134
- __argnames__ : {value: ["iterable"]}
2586
+ __argnames__ : {value: ["iterable"]},
2587
+ __module__ : {value: "__main__"}
2135
2588
  });
2136
2589
 
2137
- ρσ_desugar_kwargs = function () {
2138
- if (typeof Object.assign === "function") {
2139
- return function () {
2140
- var ans;
2141
- ans = Object.create(null);
2142
- ans[ρσ_kwargs_symbol] = true;
2143
- for (var i = 0; i < arguments.length; i++) {
2144
- Object.assign(ans, arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i]);
2145
- }
2146
- return ans;
2147
- };
2148
- }
2149
- return function () {
2150
- var ans, keys;
2151
- ans = Object.create(null);
2152
- ans[ρσ_kwargs_symbol] = true;
2153
- for (var i = 0; i < arguments.length; i++) {
2154
- keys = Object.keys(arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i]);
2155
- for (var j = 0; j < keys.length; j++) {
2156
- ans[ρσ_bound_index(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], ans)] = (ρσ_expr_temp = arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i])[ρσ_bound_index(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], ρσ_expr_temp)];
2157
- }
2590
+ ρσ_desugar_kwargs = (function() {
2591
+ var ρσ_anonfunc = function () {
2592
+ if (typeof Object.assign === "function") {
2593
+ return (function() {
2594
+ var ρσ_anonfunc = function () {
2595
+ var ans;
2596
+ ans = Object.create(null);
2597
+ ans[ρσ_kwargs_symbol] = true;
2598
+ for (var i = 0; i < arguments.length; i++) {
2599
+ Object.assign(ans, arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i]);
2600
+ }
2601
+ return ans;
2602
+ };
2603
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2604
+ __module__ : {value: "__main__"}
2605
+ });
2606
+ return ρσ_anonfunc;
2607
+ })();
2158
2608
  }
2159
- return ans;
2609
+ return (function() {
2610
+ var ρσ_anonfunc = function () {
2611
+ var ans, keys;
2612
+ ans = Object.create(null);
2613
+ ans[ρσ_kwargs_symbol] = true;
2614
+ for (var i = 0; i < arguments.length; i++) {
2615
+ keys = Object.keys(arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i]);
2616
+ for (var j = 0; j < keys.length; j++) {
2617
+ ans[ρσ_bound_index(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], ans)] = (ρσ_expr_temp = arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i])[ρσ_bound_index(keys[(typeof j === "number" && j < 0) ? keys.length + j : j], ρσ_expr_temp)];
2618
+ }
2619
+ }
2620
+ return ans;
2621
+ };
2622
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2623
+ __module__ : {value: "__main__"}
2624
+ });
2625
+ return ρσ_anonfunc;
2626
+ })();
2160
2627
  };
2161
- }();
2628
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2629
+ __module__ : {value: "__main__"}
2630
+ });
2631
+ return ρσ_anonfunc;
2632
+ })()();
2162
2633
  function ρσ_interpolate_kwargs(f, supplied_args) {
2163
2634
  var has_prop, kwobj, args, prop;
2164
2635
  if (!f.__argnames__) {
@@ -2193,7 +2664,8 @@ function ρσ_interpolate_kwargs(f, supplied_args) {
2193
2664
  return f.apply(this, supplied_args);
2194
2665
  };
2195
2666
  if (!ρσ_interpolate_kwargs.__argnames__) Object.defineProperties(ρσ_interpolate_kwargs, {
2196
- __argnames__ : {value: ["f", "supplied_args"]}
2667
+ __argnames__ : {value: ["f", "supplied_args"]},
2668
+ __module__ : {value: "__main__"}
2197
2669
  });
2198
2670
 
2199
2671
  function ρσ_interpolate_kwargs_constructor(apply, f, supplied_args) {
@@ -2205,7 +2677,8 @@ function ρσ_interpolate_kwargs_constructor(apply, f, supplied_args) {
2205
2677
  return this;
2206
2678
  };
2207
2679
  if (!ρσ_interpolate_kwargs_constructor.__argnames__) Object.defineProperties(ρσ_interpolate_kwargs_constructor, {
2208
- __argnames__ : {value: ["apply", "f", "supplied_args"]}
2680
+ __argnames__ : {value: ["apply", "f", "supplied_args"]},
2681
+ __module__ : {value: "__main__"}
2209
2682
  });
2210
2683
 
2211
2684
  function ρσ_getitem(obj, key) {
@@ -2218,7 +2691,8 @@ function ρσ_getitem(obj, key) {
2218
2691
  return obj[(typeof key === "number" && key < 0) ? obj.length + key : key];
2219
2692
  };
2220
2693
  if (!ρσ_getitem.__argnames__) Object.defineProperties(ρσ_getitem, {
2221
- __argnames__ : {value: ["obj", "key"]}
2694
+ __argnames__ : {value: ["obj", "key"]},
2695
+ __module__ : {value: "__main__"}
2222
2696
  });
2223
2697
 
2224
2698
  function ρσ_setitem(obj, key, val) {
@@ -2232,7 +2706,8 @@ function ρσ_setitem(obj, key, val) {
2232
2706
  }
2233
2707
  };
2234
2708
  if (!ρσ_setitem.__argnames__) Object.defineProperties(ρσ_setitem, {
2235
- __argnames__ : {value: ["obj", "key", "val"]}
2709
+ __argnames__ : {value: ["obj", "key", "val"]},
2710
+ __module__ : {value: "__main__"}
2236
2711
  });
2237
2712
 
2238
2713
  function ρσ_delitem(obj, key) {
@@ -2248,7 +2723,8 @@ function ρσ_delitem(obj, key) {
2248
2723
  }
2249
2724
  };
2250
2725
  if (!ρσ_delitem.__argnames__) Object.defineProperties(ρσ_delitem, {
2251
- __argnames__ : {value: ["obj", "key"]}
2726
+ __argnames__ : {value: ["obj", "key"]},
2727
+ __module__ : {value: "__main__"}
2252
2728
  });
2253
2729
 
2254
2730
  function ρσ_bound_index(idx, arr) {
@@ -2258,7 +2734,8 @@ function ρσ_bound_index(idx, arr) {
2258
2734
  return idx;
2259
2735
  };
2260
2736
  if (!ρσ_bound_index.__argnames__) Object.defineProperties(ρσ_bound_index, {
2261
- __argnames__ : {value: ["idx", "arr"]}
2737
+ __argnames__ : {value: ["idx", "arr"]},
2738
+ __module__ : {value: "__main__"}
2262
2739
  });
2263
2740
 
2264
2741
  function ρσ_splice(arr, val, start, end) {
@@ -2275,7 +2752,8 @@ function ρσ_splice(arr, val, start, end) {
2275
2752
  Array.prototype.splice.apply(arr, [start, end - start].concat(val));
2276
2753
  };
2277
2754
  if (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {
2278
- __argnames__ : {value: ["arr", "val", "start", "end"]}
2755
+ __argnames__ : {value: ["arr", "val", "start", "end"]},
2756
+ __module__ : {value: "__main__"}
2279
2757
  });
2280
2758
 
2281
2759
  ρσ_exists = (function(){
@@ -2285,7 +2763,8 @@ if (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {
2285
2763
  return expr !== undefined && expr !== null;
2286
2764
  };
2287
2765
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2288
- __argnames__ : {value: ["expr"]}
2766
+ __argnames__ : {value: ["expr"]},
2767
+ __module__ : {value: "__main__"}
2289
2768
  });
2290
2769
  return ρσ_anonfunc;
2291
2770
  })();
@@ -2297,7 +2776,8 @@ if (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {
2297
2776
  return expr;
2298
2777
  };
2299
2778
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2300
- __argnames__ : {value: ["expr"]}
2779
+ __argnames__ : {value: ["expr"]},
2780
+ __module__ : {value: "__main__"}
2301
2781
  });
2302
2782
  return ρσ_anonfunc;
2303
2783
  })();
@@ -2306,12 +2786,19 @@ if (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {
2306
2786
  if (typeof expr === "function") {
2307
2787
  return expr;
2308
2788
  }
2309
- return function () {
2310
- return undefined;
2311
- };
2789
+ return (function() {
2790
+ var ρσ_anonfunc = function () {
2791
+ return undefined;
2792
+ };
2793
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2794
+ __module__ : {value: "__main__"}
2795
+ });
2796
+ return ρσ_anonfunc;
2797
+ })();
2312
2798
  };
2313
2799
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2314
- __argnames__ : {value: ["expr"]}
2800
+ __argnames__ : {value: ["expr"]},
2801
+ __module__ : {value: "__main__"}
2315
2802
  });
2316
2803
  return ρσ_anonfunc;
2317
2804
  })();
@@ -2320,15 +2807,22 @@ if (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {
2320
2807
  if (expr === undefined || expr === null || typeof expr.__getitem__ !== "function") {
2321
2808
  return (function(){
2322
2809
  var ρσ_d = {};
2323
- ρσ_d["__getitem__"] = function () {
2324
- return undefined;
2325
- };
2810
+ ρσ_d["__getitem__"] = (function() {
2811
+ var ρσ_anonfunc = function () {
2812
+ return undefined;
2813
+ };
2814
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2815
+ __module__ : {value: "__main__"}
2816
+ });
2817
+ return ρσ_anonfunc;
2818
+ })();
2326
2819
  return ρσ_d;
2327
2820
  }).call(this);
2328
2821
  }
2329
2822
  };
2330
2823
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2331
- __argnames__ : {value: ["expr"]}
2824
+ __argnames__ : {value: ["expr"]},
2825
+ __module__ : {value: "__main__"}
2332
2826
  });
2333
2827
  return ρσ_anonfunc;
2334
2828
  })();
@@ -2337,7 +2831,8 @@ if (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {
2337
2831
  return (expr === undefined || expr === null) ? alt : expr;
2338
2832
  };
2339
2833
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2340
- __argnames__ : {value: ["expr", "alt"]}
2834
+ __argnames__ : {value: ["expr", "alt"]},
2835
+ __module__ : {value: "__main__"}
2341
2836
  });
2342
2837
  return ρσ_anonfunc;
2343
2838
  })();
@@ -2373,6 +2868,9 @@ function ρσ_mixin() {
2373
2868
  }
2374
2869
  Object.defineProperties(target, resolved_props);
2375
2870
  };
2871
+ if (!ρσ_mixin.__module__) Object.defineProperties(ρσ_mixin, {
2872
+ __module__ : {value: "__main__"}
2873
+ });
2376
2874
 
2377
2875
  function ρσ_instanceof() {
2378
2876
  var obj, bases, q, cls, p;
@@ -2392,6 +2890,12 @@ function ρσ_instanceof() {
2392
2890
  if (q === ρσ_str && (typeof obj === "string" || obj instanceof String)) {
2393
2891
  return true;
2394
2892
  }
2893
+ if (q === ρσ_int && typeof obj === "number" && Number.isInteger(obj)) {
2894
+ return true;
2895
+ }
2896
+ if (q === ρσ_float && typeof obj === "number" && !Number.isInteger(obj)) {
2897
+ return true;
2898
+ }
2395
2899
  if (bases.length > 1) {
2396
2900
  for (var c = 1; c < bases.length; c++) {
2397
2901
  cls = bases[(typeof c === "number" && c < 0) ? bases.length + c : c];
@@ -2410,6 +2914,9 @@ function ρσ_instanceof() {
2410
2914
  }
2411
2915
  return false;
2412
2916
  };
2917
+ if (!ρσ_instanceof.__module__) Object.defineProperties(ρσ_instanceof, {
2918
+ __module__ : {value: "__main__"}
2919
+ });
2413
2920
  function sum(iterable, start) {
2414
2921
  var ans, iterator, r;
2415
2922
  if (Array.isArray(iterable)) {
@@ -2418,7 +2925,8 @@ function sum(iterable, start) {
2418
2925
  return prev + cur;
2419
2926
  };
2420
2927
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2421
- __argnames__ : {value: ["prev", "cur"]}
2928
+ __argnames__ : {value: ["prev", "cur"]},
2929
+ __module__ : {value: "__main__"}
2422
2930
  });
2423
2931
  return ρσ_anonfunc;
2424
2932
  })(), start || 0);
@@ -2433,7 +2941,8 @@ function sum(iterable, start) {
2433
2941
  return ans;
2434
2942
  };
2435
2943
  if (!sum.__argnames__) Object.defineProperties(sum, {
2436
- __argnames__ : {value: ["iterable", "start"]}
2944
+ __argnames__ : {value: ["iterable", "start"]},
2945
+ __module__ : {value: "__main__"}
2437
2946
  });
2438
2947
 
2439
2948
  function map() {
@@ -2445,45 +2954,73 @@ function map() {
2445
2954
  iterators[ρσ_bound_index(i - 1, iterators)] = iter(arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i]);
2446
2955
  }
2447
2956
  ans = {'_func':func, '_iterators':iterators, '_args':args};
2448
- ans[ρσ_iterator_symbol] = function () {
2449
- return this;
2450
- };
2451
- ans["next"] = function () {
2452
- var r;
2453
- for (var i = 0; i < this._iterators.length; i++) {
2454
- r = (ρσ_expr_temp = this._iterators)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i].next();
2455
- if (r.done) {
2456
- return {'done':true};
2957
+ ans[ρσ_iterator_symbol] = (function() {
2958
+ var ρσ_anonfunc = function () {
2959
+ return this;
2960
+ };
2961
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2962
+ __module__ : {value: "__main__"}
2963
+ });
2964
+ return ρσ_anonfunc;
2965
+ })();
2966
+ ans["next"] = (function() {
2967
+ var ρσ_anonfunc = function () {
2968
+ var r;
2969
+ for (var i = 0; i < this._iterators.length; i++) {
2970
+ r = (ρσ_expr_temp = this._iterators)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i].next();
2971
+ if (r.done) {
2972
+ return {'done':true};
2973
+ }
2974
+ (ρσ_expr_temp = this._args)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] = r.value;
2457
2975
  }
2458
- (ρσ_expr_temp = this._args)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i] = r.value;
2459
- }
2460
- return {'done':false, 'value':this._func.apply(undefined, this._args)};
2461
- };
2976
+ return {'done':false, 'value':this._func.apply(undefined, this._args)};
2977
+ };
2978
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2979
+ __module__ : {value: "__main__"}
2980
+ });
2981
+ return ρσ_anonfunc;
2982
+ })();
2462
2983
  return ans;
2463
2984
  };
2985
+ if (!map.__module__) Object.defineProperties(map, {
2986
+ __module__ : {value: "__main__"}
2987
+ });
2464
2988
 
2465
2989
  function filter(func_or_none, iterable) {
2466
2990
  var func, ans;
2467
2991
  func = (func_or_none === null) ? ρσ_bool : func_or_none;
2468
2992
  ans = {'_func':func, '_iterator':ρσ_iter(iterable)};
2469
- ans[ρσ_iterator_symbol] = function () {
2470
- return this;
2471
- };
2472
- ans["next"] = function () {
2473
- var r;
2474
- r = this._iterator.next();
2475
- while (!r.done) {
2476
- if (this._func(r.value)) {
2477
- return r;
2478
- }
2993
+ ans[ρσ_iterator_symbol] = (function() {
2994
+ var ρσ_anonfunc = function () {
2995
+ return this;
2996
+ };
2997
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
2998
+ __module__ : {value: "__main__"}
2999
+ });
3000
+ return ρσ_anonfunc;
3001
+ })();
3002
+ ans["next"] = (function() {
3003
+ var ρσ_anonfunc = function () {
3004
+ var r;
2479
3005
  r = this._iterator.next();
2480
- }
2481
- return {'done':true};
2482
- };
3006
+ while (!r.done) {
3007
+ if (this._func(r.value)) {
3008
+ return r;
3009
+ }
3010
+ r = this._iterator.next();
3011
+ }
3012
+ return {'done':true};
3013
+ };
3014
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3015
+ __module__ : {value: "__main__"}
3016
+ });
3017
+ return ρσ_anonfunc;
3018
+ })();
2483
3019
  return ans;
2484
3020
  };
2485
3021
  if (!filter.__argnames__) Object.defineProperties(filter, {
2486
- __argnames__ : {value: ["func_or_none", "iterable"]}
3022
+ __argnames__ : {value: ["func_or_none", "iterable"]},
3023
+ __module__ : {value: "__main__"}
2487
3024
  });
2488
3025
 
2489
3026
  function zip() {
@@ -2493,23 +3030,38 @@ function zip() {
2493
3030
  iterators[(typeof i === "number" && i < 0) ? iterators.length + i : i] = iter(arguments[(typeof i === "number" && i < 0) ? arguments.length + i : i]);
2494
3031
  }
2495
3032
  ans = {'_iterators':iterators};
2496
- ans[ρσ_iterator_symbol] = function () {
2497
- return this;
2498
- };
2499
- ans["next"] = function () {
2500
- var args, r;
2501
- args = new Array(this._iterators.length);
2502
- for (var i = 0; i < this._iterators.length; i++) {
2503
- r = (ρσ_expr_temp = this._iterators)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i].next();
2504
- if (r.done) {
2505
- return {'done':true};
3033
+ ans[ρσ_iterator_symbol] = (function() {
3034
+ var ρσ_anonfunc = function () {
3035
+ return this;
3036
+ };
3037
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3038
+ __module__ : {value: "__main__"}
3039
+ });
3040
+ return ρσ_anonfunc;
3041
+ })();
3042
+ ans["next"] = (function() {
3043
+ var ρσ_anonfunc = function () {
3044
+ var args, r;
3045
+ args = new Array(this._iterators.length);
3046
+ for (var i = 0; i < this._iterators.length; i++) {
3047
+ r = (ρσ_expr_temp = this._iterators)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i].next();
3048
+ if (r.done) {
3049
+ return {'done':true};
3050
+ }
3051
+ args[(typeof i === "number" && i < 0) ? args.length + i : i] = r.value;
2506
3052
  }
2507
- args[(typeof i === "number" && i < 0) ? args.length + i : i] = r.value;
2508
- }
2509
- return {'done':false, 'value':args};
2510
- };
3053
+ return {'done':false, 'value':args};
3054
+ };
3055
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3056
+ __module__ : {value: "__main__"}
3057
+ });
3058
+ return ρσ_anonfunc;
3059
+ })();
2511
3060
  return ans;
2512
3061
  };
3062
+ if (!zip.__module__) Object.defineProperties(zip, {
3063
+ __module__ : {value: "__main__"}
3064
+ });
2513
3065
 
2514
3066
  function any(iterable) {
2515
3067
  var i;
@@ -2523,7 +3075,8 @@ function any(iterable) {
2523
3075
  return false;
2524
3076
  };
2525
3077
  if (!any.__argnames__) Object.defineProperties(any, {
2526
- __argnames__ : {value: ["iterable"]}
3078
+ __argnames__ : {value: ["iterable"]},
3079
+ __module__ : {value: "__main__"}
2527
3080
  });
2528
3081
 
2529
3082
  function all(iterable) {
@@ -2538,9 +3091,11 @@ function all(iterable) {
2538
3091
  return true;
2539
3092
  };
2540
3093
  if (!all.__argnames__) Object.defineProperties(all, {
2541
- __argnames__ : {value: ["iterable"]}
3094
+ __argnames__ : {value: ["iterable"]},
3095
+ __module__ : {value: "__main__"}
2542
3096
  });
2543
- var define_str_func, ρσ_unpack, ρσ_orig_split, ρσ_orig_replace;
3097
+ var decimal_sep, define_str_func, ρσ_unpack, ρσ_orig_split, ρσ_orig_replace;
3098
+ decimal_sep = 1.1.toLocaleString()[1];
2544
3099
  function ρσ_repr_js_builtin(x, as_array) {
2545
3100
  var ans, b, keys, key;
2546
3101
  ans = [];
@@ -2560,7 +3115,8 @@ function ρσ_repr_js_builtin(x, as_array) {
2560
3115
  return b[0] + ans.join(", ") + b[1];
2561
3116
  };
2562
3117
  if (!ρσ_repr_js_builtin.__argnames__) Object.defineProperties(ρσ_repr_js_builtin, {
2563
- __argnames__ : {value: ["x", "as_array"]}
3118
+ __argnames__ : {value: ["x", "as_array"]},
3119
+ __module__ : {value: "__main__"}
2564
3120
  });
2565
3121
 
2566
3122
  function ρσ_html_element_to_string(elem) {
@@ -2583,7 +3139,8 @@ function ρσ_html_element_to_string(elem) {
2583
3139
  return ans;
2584
3140
  };
2585
3141
  if (!ρσ_html_element_to_string.__argnames__) Object.defineProperties(ρσ_html_element_to_string, {
2586
- __argnames__ : {value: ["elem"]}
3142
+ __argnames__ : {value: ["elem"]},
3143
+ __module__ : {value: "__main__"}
2587
3144
  });
2588
3145
 
2589
3146
  function ρσ_repr(x) {
@@ -2613,7 +3170,8 @@ function ρσ_repr(x) {
2613
3170
  return str.format("0x{:02x}", i);
2614
3171
  };
2615
3172
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2616
- __argnames__ : {value: ["i"]}
3173
+ __argnames__ : {value: ["i"]},
3174
+ __module__ : {value: "__main__"}
2617
3175
  });
2618
3176
  return ρσ_anonfunc;
2619
3177
  })()).join(", ") + "])";
@@ -2637,7 +3195,8 @@ function ρσ_repr(x) {
2637
3195
  return ans + "";
2638
3196
  };
2639
3197
  if (!ρσ_repr.__argnames__) Object.defineProperties(ρσ_repr, {
2640
- __argnames__ : {value: ["x"]}
3198
+ __argnames__ : {value: ["x"]},
3199
+ __module__ : {value: "__main__"}
2641
3200
  });
2642
3201
 
2643
3202
  function ρσ_str(x) {
@@ -2665,7 +3224,8 @@ function ρσ_str(x) {
2665
3224
  return str.format("0x{:02x}", i);
2666
3225
  };
2667
3226
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2668
- __argnames__ : {value: ["i"]}
3227
+ __argnames__ : {value: ["i"]},
3228
+ __module__ : {value: "__main__"}
2669
3229
  });
2670
3230
  return ρσ_anonfunc;
2671
3231
  })()).join(", ") + "])";
@@ -2684,7 +3244,8 @@ function ρσ_str(x) {
2684
3244
  return ans + "";
2685
3245
  };
2686
3246
  if (!ρσ_str.__argnames__) Object.defineProperties(ρσ_str, {
2687
- __argnames__ : {value: ["x"]}
3247
+ __argnames__ : {value: ["x"]},
3248
+ __module__ : {value: "__main__"}
2688
3249
  });
2689
3250
 
2690
3251
  define_str_func = (function() {
@@ -2701,424 +3262,454 @@ define_str_func = (function() {
2701
3262
  }
2702
3263
  };
2703
3264
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2704
- __argnames__ : {value: ["name", "func"]}
3265
+ __argnames__ : {value: ["name", "func"]},
3266
+ __module__ : {value: "__main__"}
2705
3267
  });
2706
3268
  return ρσ_anonfunc;
2707
3269
  })();
2708
3270
  ρσ_unpack = [String.prototype.split.call.bind(String.prototype.split), String.prototype.replace.call.bind(String.prototype.replace)];
2709
3271
  ρσ_orig_split = ρσ_unpack[0];
2710
3272
  ρσ_orig_replace = ρσ_unpack[1];
2711
- define_str_func("format", function () {
2712
- var template, args, kwargs, explicit, implicit, idx, split, ans, pos, in_brace, markup, ch;
2713
- template = this;
2714
- if (template === undefined) {
2715
- throw new TypeError("Template is required");
2716
- }
2717
- args = Array.prototype.slice.call(arguments);
2718
- kwargs = {};
2719
- if (args[args.length-1] && args[args.length-1][ρσ_kwargs_symbol] !== undefined) {
2720
- kwargs = args[args.length-1];
2721
- args = args.slice(0, -1);
2722
- }
2723
- explicit = implicit = false;
2724
- idx = 0;
2725
- split = ρσ_orig_split;
2726
- if (ρσ_str.format._template_resolve_pat === undefined) {
2727
- ρσ_str.format._template_resolve_pat = /[.\[]/;
2728
- }
2729
- function resolve(arg, object) {
2730
- var ρσ_unpack, first, key, rest, ans;
2731
- if (!arg) {
2732
- return object;
2733
- }
2734
- ρσ_unpack = [arg[0], arg.slice(1)];
2735
- first = ρσ_unpack[0];
2736
- arg = ρσ_unpack[1];
2737
- key = split(arg, ρσ_str.format._template_resolve_pat, 1)[0];
2738
- rest = arg.slice(key.length);
2739
- ans = (first === "[") ? object[ρσ_bound_index(key.slice(0, -1), object)] : getattr(object, key);
2740
- if (ans === undefined) {
2741
- throw new KeyError((first === "[") ? key.slice(0, -1) : key);
2742
- }
2743
- return resolve(rest, ans);
2744
- };
2745
- if (!resolve.__argnames__) Object.defineProperties(resolve, {
2746
- __argnames__ : {value: ["arg", "object"]}
2747
- });
2748
-
2749
- function resolve_format_spec(format_spec) {
2750
- if (ρσ_str.format._template_resolve_fs_pat === undefined) {
2751
- ρσ_str.format._template_resolve_fs_pat = /[{]([a-zA-Z0-9_]+)[}]/g;
2752
- }
2753
- return format_spec.replace(ρσ_str.format._template_resolve_fs_pat, (function() {
2754
- var ρσ_anonfunc = function (match, key) {
2755
- if (!Object.prototype.hasOwnProperty.call(kwargs, key)) {
2756
- return "";
2757
- }
2758
- return "" + kwargs[(typeof key === "number" && key < 0) ? kwargs.length + key : key];
2759
- };
2760
- if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
2761
- __argnames__ : {value: ["match", "key"]}
2762
- });
2763
- return ρσ_anonfunc;
2764
- })());
2765
- };
2766
- if (!resolve_format_spec.__argnames__) Object.defineProperties(resolve_format_spec, {
2767
- __argnames__ : {value: ["format_spec"]}
2768
- });
2769
-
2770
- function set_comma(ans, comma) {
2771
- var sep;
2772
- if (comma !== ",") {
2773
- sep = 1234;
2774
- sep = sep.toLocaleString(undefined, {useGrouping: true})[1];
2775
- ans = str.replace(ans, sep, comma);
3273
+ define_str_func("format", (function() {
3274
+ var ρσ_anonfunc = function () {
3275
+ var template, args, kwargs, explicit, implicit, idx, split, ans, pos, in_brace, markup, ch;
3276
+ template = this;
3277
+ if (template === undefined) {
3278
+ throw new TypeError("Template is required");
3279
+ }
3280
+ args = Array.prototype.slice.call(arguments);
3281
+ kwargs = {};
3282
+ if (args[args.length-1] && args[args.length-1][ρσ_kwargs_symbol] !== undefined) {
3283
+ kwargs = args[args.length-1];
3284
+ args = args.slice(0, -1);
3285
+ }
3286
+ explicit = implicit = false;
3287
+ idx = 0;
3288
+ split = ρσ_orig_split;
3289
+ if (ρσ_str.format._template_resolve_pat === undefined) {
3290
+ ρσ_str.format._template_resolve_pat = /[.\[]/;
2776
3291
  }
2777
- return ans;
2778
- };
2779
- if (!set_comma.__argnames__) Object.defineProperties(set_comma, {
2780
- __argnames__ : {value: ["ans", "comma"]}
2781
- });
3292
+ function resolve(arg, object) {
3293
+ var ρσ_unpack, first, key, rest, ans;
3294
+ if (!arg) {
3295
+ return object;
3296
+ }
3297
+ ρσ_unpack = [arg[0], arg.slice(1)];
3298
+ first = ρσ_unpack[0];
3299
+ arg = ρσ_unpack[1];
3300
+ key = split(arg, ρσ_str.format._template_resolve_pat, 1)[0];
3301
+ rest = arg.slice(key.length);
3302
+ ans = (first === "[") ? object[ρσ_bound_index(key.slice(0, -1), object)] : getattr(object, key);
3303
+ if (ans === undefined) {
3304
+ throw new KeyError((first === "[") ? key.slice(0, -1) : key);
3305
+ }
3306
+ return resolve(rest, ans);
3307
+ };
3308
+ if (!resolve.__argnames__) Object.defineProperties(resolve, {
3309
+ __argnames__ : {value: ["arg", "object"]},
3310
+ __module__ : {value: "__main__"}
3311
+ });
2782
3312
 
2783
- function safe_comma(value, comma) {
2784
- try {
2785
- return set_comma(value.toLocaleString(undefined, {useGrouping: true}), comma);
2786
- } catch (ρσ_Exception) {
2787
- ρσ_last_exception = ρσ_Exception;
2788
- {
2789
- return value.toString(10);
2790
- }
2791
- }
2792
- };
2793
- if (!safe_comma.__argnames__) Object.defineProperties(safe_comma, {
2794
- __argnames__ : {value: ["value", "comma"]}
2795
- });
3313
+ function resolve_format_spec(format_spec) {
3314
+ if (ρσ_str.format._template_resolve_fs_pat === undefined) {
3315
+ ρσ_str.format._template_resolve_fs_pat = /[{]([a-zA-Z0-9_]+)[}]/g;
3316
+ }
3317
+ return format_spec.replace(ρσ_str.format._template_resolve_fs_pat, (function() {
3318
+ var ρσ_anonfunc = function (match, key) {
3319
+ if (!Object.prototype.hasOwnProperty.call(kwargs, key)) {
3320
+ return "";
3321
+ }
3322
+ return "" + kwargs[(typeof key === "number" && key < 0) ? kwargs.length + key : key];
3323
+ };
3324
+ if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3325
+ __argnames__ : {value: ["match", "key"]},
3326
+ __module__ : {value: "__main__"}
3327
+ });
3328
+ return ρσ_anonfunc;
3329
+ })());
3330
+ };
3331
+ if (!resolve_format_spec.__argnames__) Object.defineProperties(resolve_format_spec, {
3332
+ __argnames__ : {value: ["format_spec"]},
3333
+ __module__ : {value: "__main__"}
3334
+ });
2796
3335
 
2797
- function safe_fixed(value, precision, comma) {
2798
- if (!comma) {
2799
- return value.toFixed(precision);
2800
- }
2801
- try {
2802
- return set_comma(value.toLocaleString(undefined, {useGrouping: true, minimumFractionDigits: precision, maximumFractionDigits: precision}), comma);
2803
- } catch (ρσ_Exception) {
2804
- ρσ_last_exception = ρσ_Exception;
2805
- {
3336
+ function set_comma(ans, comma) {
3337
+ var sep;
3338
+ if (comma !== ",") {
3339
+ sep = 1234;
3340
+ sep = sep.toLocaleString(undefined, {useGrouping: true})[1];
3341
+ ans = str.replace(ans, sep, comma);
3342
+ }
3343
+ return ans;
3344
+ };
3345
+ if (!set_comma.__argnames__) Object.defineProperties(set_comma, {
3346
+ __argnames__ : {value: ["ans", "comma"]},
3347
+ __module__ : {value: "__main__"}
3348
+ });
3349
+
3350
+ function safe_comma(value, comma) {
3351
+ try {
3352
+ return set_comma(value.toLocaleString(undefined, {useGrouping: true}), comma);
3353
+ } catch (ρσ_Exception) {
3354
+ ρσ_last_exception = ρσ_Exception;
3355
+ {
3356
+ return value.toString(10);
3357
+ }
3358
+ }
3359
+ };
3360
+ if (!safe_comma.__argnames__) Object.defineProperties(safe_comma, {
3361
+ __argnames__ : {value: ["value", "comma"]},
3362
+ __module__ : {value: "__main__"}
3363
+ });
3364
+
3365
+ function safe_fixed(value, precision, comma) {
3366
+ if (!comma) {
2806
3367
  return value.toFixed(precision);
2807
- }
2808
- }
2809
- };
2810
- if (!safe_fixed.__argnames__) Object.defineProperties(safe_fixed, {
2811
- __argnames__ : {value: ["value", "precision", "comma"]}
2812
- });
3368
+ }
3369
+ try {
3370
+ return set_comma(value.toLocaleString(undefined, {useGrouping: true, minimumFractionDigits: precision, maximumFractionDigits: precision}), comma);
3371
+ } catch (ρσ_Exception) {
3372
+ ρσ_last_exception = ρσ_Exception;
3373
+ {
3374
+ return value.toFixed(precision);
3375
+ }
3376
+ }
3377
+ };
3378
+ if (!safe_fixed.__argnames__) Object.defineProperties(safe_fixed, {
3379
+ __argnames__ : {value: ["value", "precision", "comma"]},
3380
+ __module__ : {value: "__main__"}
3381
+ });
2813
3382
 
2814
- function apply_formatting(value, format_spec) {
2815
- var ρσ_unpack, fill, align, sign, fhash, zeropad, width, comma, precision, ftype, is_numeric, is_int, lftype, code, prec, exp, nval, is_positive, left, right;
2816
- if (format_spec.indexOf("{") !== -1) {
2817
- format_spec = resolve_format_spec(format_spec);
2818
- }
2819
- if (ρσ_str.format._template_format_pat === undefined) {
2820
- ρσ_str.format._template_format_pat = /([^{}](?=[<>=^]))?([<>=^])?([-+\x20])?(\#)?(0)?(\d+)?([,_])?(?:\.(\d+))?([bcdeEfFgGnosxX%])?/;
2821
- }
2822
- try {
2823
- ρσ_unpack = format_spec.match(ρσ_str.format._template_format_pat).slice(1);
2824
- ρσ_unpack = ρσ_unpack_asarray(9, ρσ_unpack);
2825
- fill = ρσ_unpack[0];
2826
- align = ρσ_unpack[1];
2827
- sign = ρσ_unpack[2];
2828
- fhash = ρσ_unpack[3];
2829
- zeropad = ρσ_unpack[4];
2830
- width = ρσ_unpack[5];
2831
- comma = ρσ_unpack[6];
2832
- precision = ρσ_unpack[7];
2833
- ftype = ρσ_unpack[8];
2834
- } catch (ρσ_Exception) {
2835
- ρσ_last_exception = ρσ_Exception;
2836
- if (ρσ_Exception instanceof TypeError) {
2837
- return value;
2838
- } else {
2839
- throw ρσ_Exception;
3383
+ function apply_formatting(value, format_spec) {
3384
+ var ρσ_unpack, fill, align, sign, fhash, zeropad, width, comma, precision, ftype, is_numeric, is_int, lftype, code, prec, exp, nval, is_positive, left, right;
3385
+ if (format_spec.indexOf("{") !== -1) {
3386
+ format_spec = resolve_format_spec(format_spec);
2840
3387
  }
2841
- }
2842
- if (zeropad) {
2843
- fill = fill || "0";
2844
- align = align || "=";
2845
- } else {
2846
- fill = fill || " ";
2847
- align = align || ">";
2848
- }
2849
- is_numeric = Number(value) === value;
2850
- is_int = is_numeric && value % 1 === 0;
2851
- precision = parseInt(precision, 10);
2852
- lftype = (ftype || "").toLowerCase();
2853
- if (ftype === "n") {
2854
- is_numeric = true;
2855
- if (is_int) {
2856
- if (comma) {
2857
- throw new ValueError("Cannot specify ',' with 'n'");
3388
+ if (ρσ_str.format._template_format_pat === undefined) {
3389
+ ρσ_str.format._template_format_pat = /([^{}](?=[<>=^]))?([<>=^])?([-+\x20])?(\#)?(0)?(\d+)?([,_])?(?:\.(\d+))?([bcdeEfFgGnosxX%])?/;
3390
+ }
3391
+ try {
3392
+ ρσ_unpack = format_spec.match(ρσ_str.format._template_format_pat).slice(1);
3393
+ ρσ_unpack = ρσ_unpack_asarray(9, ρσ_unpack);
3394
+ fill = ρσ_unpack[0];
3395
+ align = ρσ_unpack[1];
3396
+ sign = ρσ_unpack[2];
3397
+ fhash = ρσ_unpack[3];
3398
+ zeropad = ρσ_unpack[4];
3399
+ width = ρσ_unpack[5];
3400
+ comma = ρσ_unpack[6];
3401
+ precision = ρσ_unpack[7];
3402
+ ftype = ρσ_unpack[8];
3403
+ } catch (ρσ_Exception) {
3404
+ ρσ_last_exception = ρσ_Exception;
3405
+ if (ρσ_Exception instanceof TypeError) {
3406
+ return value;
3407
+ } else {
3408
+ throw ρσ_Exception;
2858
3409
  }
2859
- value = parseInt(value, 10).toLocaleString();
3410
+ }
3411
+ if (zeropad) {
3412
+ fill = fill || "0";
3413
+ align = align || "=";
2860
3414
  } else {
2861
- value = parseFloat(value).toLocaleString();
2862
- }
2863
- } else if (['b', 'c', 'd', 'o', 'x'].indexOf(lftype) !== -1) {
2864
- value = parseInt(value, 10);
2865
- is_numeric = true;
2866
- if (!isNaN(value)) {
2867
- if (ftype === "b") {
2868
- value = (value >>> 0).toString(2);
2869
- if (fhash) {
2870
- value = "0b" + value;
3415
+ fill = fill || " ";
3416
+ align = align || ">";
3417
+ }
3418
+ is_numeric = Number(value) === value;
3419
+ is_int = is_numeric && value % 1 === 0;
3420
+ precision = parseInt(precision, 10);
3421
+ lftype = (ftype || "").toLowerCase();
3422
+ if (ftype === "n") {
3423
+ is_numeric = true;
3424
+ if (is_int) {
3425
+ if (comma) {
3426
+ throw new ValueError("Cannot specify ',' with 'n'");
2871
3427
  }
2872
- } else if (ftype === "c") {
2873
- if (value > 65535) {
2874
- code = value - 65536;
2875
- value = String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));
2876
- } else {
2877
- value = String.fromCharCode(value);
3428
+ value = parseInt(value, 10).toLocaleString();
3429
+ } else {
3430
+ value = parseFloat(value).toLocaleString();
3431
+ }
3432
+ } else if (['b', 'c', 'd', 'o', 'x'].indexOf(lftype) !== -1) {
3433
+ value = parseInt(value, 10);
3434
+ is_numeric = true;
3435
+ if (!isNaN(value)) {
3436
+ if (ftype === "b") {
3437
+ value = (value >>> 0).toString(2);
3438
+ if (fhash) {
3439
+ value = "0b" + value;
3440
+ }
3441
+ } else if (ftype === "c") {
3442
+ if (value > 65535) {
3443
+ code = value - 65536;
3444
+ value = String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));
3445
+ } else {
3446
+ value = String.fromCharCode(value);
3447
+ }
3448
+ } else if (ftype === "d") {
3449
+ if (comma) {
3450
+ value = safe_comma(value, comma);
3451
+ } else {
3452
+ value = value.toString(10);
3453
+ }
3454
+ } else if (ftype === "o") {
3455
+ value = value.toString(8);
3456
+ if (fhash) {
3457
+ value = "0o" + value;
3458
+ }
3459
+ } else if (lftype === "x") {
3460
+ value = value.toString(16);
3461
+ value = (ftype === "x") ? value.toLowerCase() : value.toUpperCase();
3462
+ if (fhash) {
3463
+ value = "0x" + value;
3464
+ }
2878
3465
  }
2879
- } else if (ftype === "d") {
2880
- if (comma) {
2881
- value = safe_comma(value, comma);
3466
+ }
3467
+ } else if (['e','f','g','%'].indexOf(lftype) !== -1) {
3468
+ is_numeric = true;
3469
+ value = parseFloat(value);
3470
+ prec = (isNaN(precision)) ? 6 : precision;
3471
+ if (lftype === "e") {
3472
+ value = value.toExponential(prec);
3473
+ value = (ftype === "E") ? value.toUpperCase() : value.toLowerCase();
3474
+ } else if (lftype === "f") {
3475
+ value = safe_fixed(value, prec, comma);
3476
+ value = (ftype === "F") ? value.toUpperCase() : value.toLowerCase();
3477
+ } else if (lftype === "%") {
3478
+ value *= 100;
3479
+ value = safe_fixed(value, prec, comma) + "%";
3480
+ } else if (lftype === "g") {
3481
+ prec = max(1, prec);
3482
+ exp = parseInt(split(value.toExponential(prec - 1).toLowerCase(), "e")[1], 10);
3483
+ if (-4 <= exp && exp < prec) {
3484
+ value = safe_fixed(value, prec - 1 - exp, comma);
2882
3485
  } else {
2883
- value = value.toString(10);
3486
+ value = value.toExponential(prec - 1);
2884
3487
  }
2885
- } else if (ftype === "o") {
2886
- value = value.toString(8);
2887
- if (fhash) {
2888
- value = "0o" + value;
3488
+ value = value.replace(/0+$/g, "");
3489
+ if (value[value.length-1] === decimal_sep) {
3490
+ value = value.slice(0, -1);
2889
3491
  }
2890
- } else if (lftype === "x") {
2891
- value = value.toString(16);
2892
- value = (ftype === "x") ? value.toLowerCase() : value.toUpperCase();
2893
- if (fhash) {
2894
- value = "0x" + value;
3492
+ if (ftype === "G") {
3493
+ value = value.toUpperCase();
2895
3494
  }
2896
3495
  }
2897
- }
2898
- } else if (['e','f','g','%'].indexOf(lftype) !== -1) {
2899
- is_numeric = true;
2900
- value = parseFloat(value);
2901
- prec = (isNaN(precision)) ? 6 : precision;
2902
- if (lftype === "e") {
2903
- value = value.toExponential(prec);
2904
- value = (ftype === "E") ? value.toUpperCase() : value.toLowerCase();
2905
- } else if (lftype === "f") {
2906
- value = safe_fixed(value, prec, comma);
2907
- value = (ftype === "F") ? value.toUpperCase() : value.toLowerCase();
2908
- } else if (lftype === "%") {
2909
- value *= 100;
2910
- value = safe_fixed(value, prec, comma) + "%";
2911
- } else if (lftype === "g") {
2912
- prec = max(1, prec);
2913
- exp = parseInt(split(value.toExponential(prec - 1).toLowerCase(), "e")[1], 10);
2914
- if (-4 <= exp && exp < prec) {
2915
- value = safe_fixed(value, prec - 1 - exp, comma);
2916
- } else {
2917
- value = value.toExponential(prec - 1);
2918
- }
2919
- value = value.replace(/0+$/g, "");
2920
- if (value[value.length-1] === ".") {
2921
- value = value.slice(0, -1);
3496
+ } else {
3497
+ if (comma) {
3498
+ value = parseInt(value, 10);
3499
+ if (isNaN(value)) {
3500
+ throw new ValueError("Must use numbers with , or _");
3501
+ }
3502
+ value = safe_comma(value, comma);
2922
3503
  }
2923
- if (ftype === "G") {
2924
- value = value.toUpperCase();
3504
+ value += "";
3505
+ if (!isNaN(precision)) {
3506
+ value = value.slice(0, precision);
2925
3507
  }
2926
3508
  }
2927
- } else {
2928
- if (comma) {
2929
- value = parseInt(value, 10);
2930
- if (isNaN(value)) {
2931
- throw new ValueError("Must use numbers with , or _");
3509
+ value += "";
3510
+ if (is_numeric && sign) {
3511
+ nval = Number(value);
3512
+ is_positive = !isNaN(nval) && nval >= 0;
3513
+ if (is_positive && (sign === " " || sign === "+")) {
3514
+ value = sign + value;
2932
3515
  }
2933
- value = safe_comma(value, comma);
2934
3516
  }
2935
- value += "";
2936
- if (!isNaN(precision)) {
2937
- value = value.slice(0, precision);
3517
+ function repeat(char, num) {
3518
+ return (new Array(num+1)).join(char);
3519
+ };
3520
+ if (!repeat.__argnames__) Object.defineProperties(repeat, {
3521
+ __argnames__ : {value: ["char", "num"]},
3522
+ __module__ : {value: "__main__"}
3523
+ });
3524
+
3525
+ if (is_numeric && width && width[0] === "0") {
3526
+ width = width.slice(1);
3527
+ ρσ_unpack = ["0", "="];
3528
+ fill = ρσ_unpack[0];
3529
+ align = ρσ_unpack[1];
2938
3530
  }
2939
- }
2940
- value += "";
2941
- if (is_numeric && sign) {
2942
- nval = Number(value);
2943
- is_positive = !isNaN(nval) && nval >= 0;
2944
- if (is_positive && (sign === " " || sign === "+")) {
2945
- value = sign + value;
3531
+ width = parseInt(width || "-1", 10);
3532
+ if (isNaN(width)) {
3533
+ throw new ValueError("Invalid width specification: " + width);
2946
3534
  }
2947
- }
2948
- function repeat(char, num) {
2949
- return (new Array(num+1)).join(char);
3535
+ if (fill && value.length < width) {
3536
+ if (align === "<") {
3537
+ value = value + repeat(fill, width - value.length);
3538
+ } else if (align === ">") {
3539
+ value = repeat(fill, width - value.length) + value;
3540
+ } else if (align === "^") {
3541
+ left = Math.floor((width - value.length) / 2);
3542
+ right = width - left - value.length;
3543
+ value = repeat(fill, left) + value + repeat(fill, right);
3544
+ } else if (align === "=") {
3545
+ if (ρσ_in(value[0], "+- ")) {
3546
+ value = value[0] + repeat(fill, width - value.length) + value.slice(1);
3547
+ } else {
3548
+ value = repeat(fill, width - value.length) + value;
3549
+ }
3550
+ } else {
3551
+ throw new ValueError("Unrecognized alignment: " + align);
3552
+ }
3553
+ }
3554
+ return value;
2950
3555
  };
2951
- if (!repeat.__argnames__) Object.defineProperties(repeat, {
2952
- __argnames__ : {value: ["char", "num"]}
3556
+ if (!apply_formatting.__argnames__) Object.defineProperties(apply_formatting, {
3557
+ __argnames__ : {value: ["value", "format_spec"]},
3558
+ __module__ : {value: "__main__"}
2953
3559
  });
2954
3560
 
2955
- if (is_numeric && width && width[0] === "0") {
2956
- width = width.slice(1);
2957
- ρσ_unpack = ["0", "="];
2958
- fill = ρσ_unpack[0];
2959
- align = ρσ_unpack[1];
2960
- }
2961
- width = parseInt(width || "-1", 10);
2962
- if (isNaN(width)) {
2963
- throw new ValueError("Invalid width specification: " + width);
2964
- }
2965
- if (fill && value.length < width) {
2966
- if (align === "<") {
2967
- value = value + repeat(fill, width - value.length);
2968
- } else if (align === ">") {
2969
- value = repeat(fill, width - value.length) + value;
2970
- } else if (align === "^") {
2971
- left = Math.floor((width - value.length) / 2);
2972
- right = width - left - value.length;
2973
- value = repeat(fill, left) + value + repeat(fill, right);
2974
- } else if (align === "=") {
2975
- if (ρσ_in(value[0], "+- ")) {
2976
- value = value[0] + repeat(fill, width - value.length) + value.slice(1);
3561
+ function parse_markup(markup) {
3562
+ var key, transformer, format_spec, pos, state, ch;
3563
+ key = transformer = format_spec = "";
3564
+ pos = 0;
3565
+ state = 0;
3566
+ while (pos < markup.length) {
3567
+ ch = markup[(typeof pos === "number" && pos < 0) ? markup.length + pos : pos];
3568
+ if (state === 0) {
3569
+ if (ch === "!") {
3570
+ state = 1;
3571
+ } else if (ch === ":") {
3572
+ state = 2;
3573
+ } else {
3574
+ key += ch;
3575
+ }
3576
+ } else if (state === 1) {
3577
+ if (ch === ":") {
3578
+ state = 2;
3579
+ } else {
3580
+ transformer += ch;
3581
+ }
2977
3582
  } else {
2978
- value = repeat(fill, width - value.length) + value;
3583
+ format_spec += ch;
2979
3584
  }
2980
- } else {
2981
- throw new ValueError("Unrecognized alignment: " + align);
3585
+ pos += 1;
2982
3586
  }
2983
- }
2984
- return value;
2985
- };
2986
- if (!apply_formatting.__argnames__) Object.defineProperties(apply_formatting, {
2987
- __argnames__ : {value: ["value", "format_spec"]}
2988
- });
3587
+ return [key, transformer, format_spec];
3588
+ };
3589
+ if (!parse_markup.__argnames__) Object.defineProperties(parse_markup, {
3590
+ __argnames__ : {value: ["markup"]},
3591
+ __module__ : {value: "__main__"}
3592
+ });
2989
3593
 
2990
- function parse_markup(markup) {
2991
- var key, transformer, format_spec, pos, state, ch;
2992
- key = transformer = format_spec = "";
2993
- pos = 0;
2994
- state = 0;
2995
- while (pos < markup.length) {
2996
- ch = markup[(typeof pos === "number" && pos < 0) ? markup.length + pos : pos];
2997
- if (state === 0) {
2998
- if (ch === "!") {
2999
- state = 1;
3000
- } else if (ch === ":") {
3001
- state = 2;
3002
- } else {
3003
- key += ch;
3594
+ function render_markup(markup) {
3595
+ var ρσ_unpack, key, transformer, format_spec, ends_with_equal, lkey, nvalue, object, ans;
3596
+ ρσ_unpack = parse_markup(markup);
3597
+ ρσ_unpack = ρσ_unpack_asarray(3, ρσ_unpack);
3598
+ key = ρσ_unpack[0];
3599
+ transformer = ρσ_unpack[1];
3600
+ format_spec = ρσ_unpack[2];
3601
+ if (transformer && ['a', 'r', 's'].indexOf(transformer) === -1) {
3602
+ throw new ValueError("Unknown conversion specifier: " + transformer);
3603
+ }
3604
+ ends_with_equal = key.endsWith("=");
3605
+ if (ends_with_equal) {
3606
+ key = key.slice(0, -1);
3607
+ }
3608
+ lkey = key.length && split(key, /[.\[]/, 1)[0];
3609
+ if (lkey) {
3610
+ explicit = true;
3611
+ if (implicit) {
3612
+ throw new ValueError("cannot switch from automatic field numbering to manual field specification");
3004
3613
  }
3005
- } else if (state === 1) {
3006
- if (ch === ":") {
3007
- state = 2;
3008
- } else {
3009
- transformer += ch;
3614
+ nvalue = parseInt(lkey);
3615
+ object = (isNaN(nvalue)) ? kwargs[(typeof lkey === "number" && lkey < 0) ? kwargs.length + lkey : lkey] : args[(typeof nvalue === "number" && nvalue < 0) ? args.length + nvalue : nvalue];
3616
+ if (object === undefined) {
3617
+ if (isNaN(nvalue)) {
3618
+ throw new KeyError(lkey);
3619
+ }
3620
+ throw new IndexError(lkey);
3010
3621
  }
3622
+ object = resolve(key.slice(lkey.length), object);
3011
3623
  } else {
3012
- format_spec += ch;
3013
- }
3014
- pos += 1;
3015
- }
3016
- return [key, transformer, format_spec];
3017
- };
3018
- if (!parse_markup.__argnames__) Object.defineProperties(parse_markup, {
3019
- __argnames__ : {value: ["markup"]}
3020
- });
3021
-
3022
- function render_markup(markup) {
3023
- var ρσ_unpack, key, transformer, format_spec, lkey, nvalue, object, ans;
3024
- ρσ_unpack = parse_markup(markup);
3025
- ρσ_unpack = ρσ_unpack_asarray(3, ρσ_unpack);
3026
- key = ρσ_unpack[0];
3027
- transformer = ρσ_unpack[1];
3028
- format_spec = ρσ_unpack[2];
3029
- if (transformer && ['a', 'r', 's'].indexOf(transformer) === -1) {
3030
- throw new ValueError("Unknown conversion specifier: " + transformer);
3031
- }
3032
- lkey = key.length && split(key, /[.\[]/, 1)[0];
3033
- if (lkey) {
3034
- explicit = true;
3035
- if (implicit) {
3036
- throw new ValueError("cannot switch from automatic field numbering to manual field specification");
3037
- }
3038
- nvalue = parseInt(lkey);
3039
- object = (isNaN(nvalue)) ? kwargs[(typeof lkey === "number" && lkey < 0) ? kwargs.length + lkey : lkey] : args[(typeof nvalue === "number" && nvalue < 0) ? args.length + nvalue : nvalue];
3040
- if (object === undefined) {
3041
- if (isNaN(nvalue)) {
3042
- throw new KeyError(lkey);
3624
+ implicit = true;
3625
+ if (explicit) {
3626
+ throw new ValueError("cannot switch from manual field specification to automatic field numbering");
3043
3627
  }
3044
- throw new IndexError(lkey);
3628
+ if (idx >= args.length) {
3629
+ throw new IndexError("Not enough arguments to match template: " + template);
3630
+ }
3631
+ object = args[(typeof idx === "number" && idx < 0) ? args.length + idx : idx];
3632
+ idx += 1;
3045
3633
  }
3046
- object = resolve(key.slice(lkey.length), object);
3047
- } else {
3048
- implicit = true;
3049
- if (explicit) {
3050
- throw new ValueError("cannot switch from manual field specification to automatic field numbering");
3634
+ if (typeof object === "function") {
3635
+ object = object();
3051
3636
  }
3052
- if (idx >= args.length) {
3053
- throw new IndexError("Not enough arguments to match template: " + template);
3637
+ ans = "" + object;
3638
+ if (format_spec) {
3639
+ ans = apply_formatting(ans, format_spec);
3054
3640
  }
3055
- object = args[(typeof idx === "number" && idx < 0) ? args.length + idx : idx];
3056
- idx += 1;
3057
- }
3058
- if (typeof object === "function") {
3059
- object = object();
3060
- }
3061
- ans = "" + object;
3062
- if (format_spec) {
3063
- ans = apply_formatting(ans, format_spec);
3064
- }
3065
- return ans;
3066
- };
3067
- if (!render_markup.__argnames__) Object.defineProperties(render_markup, {
3068
- __argnames__ : {value: ["markup"]}
3069
- });
3641
+ if (ends_with_equal) {
3642
+ ans = "" + ρσ_str.format("{}", key) + "=" + ρσ_str.format("{}", ans) + "";
3643
+ }
3644
+ return ans;
3645
+ };
3646
+ if (!render_markup.__argnames__) Object.defineProperties(render_markup, {
3647
+ __argnames__ : {value: ["markup"]},
3648
+ __module__ : {value: "__main__"}
3649
+ });
3070
3650
 
3071
- ans = "";
3072
- pos = 0;
3073
- in_brace = 0;
3074
- markup = "";
3075
- while (pos < template.length) {
3076
- ch = template[(typeof pos === "number" && pos < 0) ? template.length + pos : pos];
3077
- if (in_brace) {
3078
- if (ch === "{") {
3079
- in_brace += 1;
3080
- markup += "{";
3081
- } else if (ch === "}") {
3082
- in_brace -= 1;
3083
- if (in_brace > 0) {
3084
- markup += "}";
3651
+ ans = "";
3652
+ pos = 0;
3653
+ in_brace = 0;
3654
+ markup = "";
3655
+ while (pos < template.length) {
3656
+ ch = template[(typeof pos === "number" && pos < 0) ? template.length + pos : pos];
3657
+ if (in_brace) {
3658
+ if (ch === "{") {
3659
+ in_brace += 1;
3660
+ markup += "{";
3661
+ } else if (ch === "}") {
3662
+ in_brace -= 1;
3663
+ if (in_brace > 0) {
3664
+ markup += "}";
3665
+ } else {
3666
+ ans += render_markup(markup);
3667
+ }
3085
3668
  } else {
3086
- ans += render_markup(markup);
3669
+ markup += ch;
3087
3670
  }
3088
3671
  } else {
3089
- markup += ch;
3090
- }
3091
- } else {
3092
- if (ch === "{") {
3093
- if (template[ρσ_bound_index(pos + 1, template)] === "{") {
3094
- pos += 1;
3095
- ans += "{";
3672
+ if (ch === "{") {
3673
+ if (template[ρσ_bound_index(pos + 1, template)] === "{") {
3674
+ pos += 1;
3675
+ ans += "{";
3676
+ } else {
3677
+ in_brace = 1;
3678
+ markup = "";
3679
+ }
3096
3680
  } else {
3097
- in_brace = 1;
3098
- markup = "";
3099
- }
3100
- } else {
3101
- ans += ch;
3102
- if (ch === "}" && template[ρσ_bound_index(pos + 1, template)] === "}") {
3103
- pos += 1;
3681
+ ans += ch;
3682
+ if (ch === "}" && template[ρσ_bound_index(pos + 1, template)] === "}") {
3683
+ pos += 1;
3684
+ }
3104
3685
  }
3105
3686
  }
3687
+ pos += 1;
3106
3688
  }
3107
- pos += 1;
3108
- }
3109
- if (in_brace) {
3110
- throw new ValueError("expected '}' before end of string");
3111
- }
3112
- return ans;
3113
- });
3114
- define_str_func("capitalize", function () {
3115
- var string;
3116
- string = this;
3117
- if (string) {
3118
- string = string[0].toUpperCase() + string.slice(1).toLowerCase();
3119
- }
3120
- return string;
3121
- });
3689
+ if (in_brace) {
3690
+ throw new ValueError("expected '}' before end of string");
3691
+ }
3692
+ return ans;
3693
+ };
3694
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3695
+ __module__ : {value: "__main__"}
3696
+ });
3697
+ return ρσ_anonfunc;
3698
+ })());
3699
+ define_str_func("capitalize", (function() {
3700
+ var ρσ_anonfunc = function () {
3701
+ var string;
3702
+ string = this;
3703
+ if (string) {
3704
+ string = string[0].toUpperCase() + string.slice(1).toLowerCase();
3705
+ }
3706
+ return string;
3707
+ };
3708
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3709
+ __module__ : {value: "__main__"}
3710
+ });
3711
+ return ρσ_anonfunc;
3712
+ })());
3122
3713
  define_str_func("center", (function() {
3123
3714
  var ρσ_anonfunc = function (width, fill) {
3124
3715
  var left, right;
@@ -3128,7 +3719,8 @@ define_str_func("center", (function() {
3128
3719
  return new Array(left+1).join(fill) + this + new Array(right+1).join(fill);
3129
3720
  };
3130
3721
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3131
- __argnames__ : {value: ["width", "fill"]}
3722
+ __argnames__ : {value: ["width", "fill"]},
3723
+ __module__ : {value: "__main__"}
3132
3724
  });
3133
3725
  return ρσ_anonfunc;
3134
3726
  })());
@@ -3160,7 +3752,8 @@ define_str_func("count", (function() {
3160
3752
  return ans;
3161
3753
  };
3162
3754
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3163
- __argnames__ : {value: ["needle", "start", "end"]}
3755
+ __argnames__ : {value: ["needle", "start", "end"]},
3756
+ __module__ : {value: "__main__"}
3164
3757
  });
3165
3758
  return ρσ_anonfunc;
3166
3759
  })());
@@ -3184,7 +3777,8 @@ define_str_func("endswith", (function() {
3184
3777
  return false;
3185
3778
  };
3186
3779
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3187
- __argnames__ : {value: ["suffixes", "start", "end"]}
3780
+ __argnames__ : {value: ["suffixes", "start", "end"]},
3781
+ __module__ : {value: "__main__"}
3188
3782
  });
3189
3783
  return ρσ_anonfunc;
3190
3784
  })());
@@ -3205,7 +3799,8 @@ define_str_func("startswith", (function() {
3205
3799
  return false;
3206
3800
  };
3207
3801
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3208
- __argnames__ : {value: ["prefixes", "start", "end"]}
3802
+ __argnames__ : {value: ["prefixes", "start", "end"]},
3803
+ __module__ : {value: "__main__"}
3209
3804
  });
3210
3805
  return ρσ_anonfunc;
3211
3806
  })());
@@ -3227,7 +3822,8 @@ define_str_func("find", (function() {
3227
3822
  return ans;
3228
3823
  };
3229
3824
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3230
- __argnames__ : {value: ["needle", "start", "end"]}
3825
+ __argnames__ : {value: ["needle", "start", "end"]},
3826
+ __module__ : {value: "__main__"}
3231
3827
  });
3232
3828
  return ρσ_anonfunc;
3233
3829
  })());
@@ -3249,7 +3845,8 @@ define_str_func("rfind", (function() {
3249
3845
  return ans;
3250
3846
  };
3251
3847
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3252
- __argnames__ : {value: ["needle", "start", "end"]}
3848
+ __argnames__ : {value: ["needle", "start", "end"]},
3849
+ __module__ : {value: "__main__"}
3253
3850
  });
3254
3851
  return ρσ_anonfunc;
3255
3852
  })());
@@ -3263,7 +3860,8 @@ define_str_func("index", (function() {
3263
3860
  return ans;
3264
3861
  };
3265
3862
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3266
- __argnames__ : {value: ["needle", "start", "end"]}
3863
+ __argnames__ : {value: ["needle", "start", "end"]},
3864
+ __module__ : {value: "__main__"}
3267
3865
  });
3268
3866
  return ρσ_anonfunc;
3269
3867
  })());
@@ -3277,19 +3875,38 @@ define_str_func("rindex", (function() {
3277
3875
  return ans;
3278
3876
  };
3279
3877
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3280
- __argnames__ : {value: ["needle", "start", "end"]}
3878
+ __argnames__ : {value: ["needle", "start", "end"]},
3879
+ __module__ : {value: "__main__"}
3880
+ });
3881
+ return ρσ_anonfunc;
3882
+ })());
3883
+ define_str_func("islower", (function() {
3884
+ var ρσ_anonfunc = function () {
3885
+ return this.length > 0 && this.toLowerCase() === this.toString();
3886
+ };
3887
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3888
+ __module__ : {value: "__main__"}
3889
+ });
3890
+ return ρσ_anonfunc;
3891
+ })());
3892
+ define_str_func("isupper", (function() {
3893
+ var ρσ_anonfunc = function () {
3894
+ return this.length > 0 && this.toUpperCase() === this.toString();
3895
+ };
3896
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3897
+ __module__ : {value: "__main__"}
3898
+ });
3899
+ return ρσ_anonfunc;
3900
+ })());
3901
+ define_str_func("isspace", (function() {
3902
+ var ρσ_anonfunc = function () {
3903
+ return this.length > 0 && /^\s+$/.test(this);
3904
+ };
3905
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3906
+ __module__ : {value: "__main__"}
3281
3907
  });
3282
3908
  return ρσ_anonfunc;
3283
3909
  })());
3284
- define_str_func("islower", function () {
3285
- return this.length > 0 && this.toLowerCase() === this.toString();
3286
- });
3287
- define_str_func("isupper", function () {
3288
- return this.length > 0 && this.toUpperCase() === this.toString();
3289
- });
3290
- define_str_func("isspace", function () {
3291
- return this.length > 0 && /^\s+$/.test(this);
3292
- });
3293
3910
  define_str_func("join", (function() {
3294
3911
  var ρσ_anonfunc = function (iterable) {
3295
3912
  var ans, r;
@@ -3308,7 +3925,8 @@ define_str_func("join", (function() {
3308
3925
  return ans;
3309
3926
  };
3310
3927
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3311
- __argnames__ : {value: ["iterable"]}
3928
+ __argnames__ : {value: ["iterable"]},
3929
+ __module__ : {value: "__main__"}
3312
3930
  });
3313
3931
  return ρσ_anonfunc;
3314
3932
  })());
@@ -3323,7 +3941,8 @@ define_str_func("ljust", (function() {
3323
3941
  return string;
3324
3942
  };
3325
3943
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3326
- __argnames__ : {value: ["width", "fill"]}
3944
+ __argnames__ : {value: ["width", "fill"]},
3945
+ __module__ : {value: "__main__"}
3327
3946
  });
3328
3947
  return ρσ_anonfunc;
3329
3948
  })());
@@ -3338,16 +3957,29 @@ define_str_func("rjust", (function() {
3338
3957
  return string;
3339
3958
  };
3340
3959
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3341
- __argnames__ : {value: ["width", "fill"]}
3960
+ __argnames__ : {value: ["width", "fill"]},
3961
+ __module__ : {value: "__main__"}
3962
+ });
3963
+ return ρσ_anonfunc;
3964
+ })());
3965
+ define_str_func("lower", (function() {
3966
+ var ρσ_anonfunc = function () {
3967
+ return this.toLowerCase();
3968
+ };
3969
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3970
+ __module__ : {value: "__main__"}
3971
+ });
3972
+ return ρσ_anonfunc;
3973
+ })());
3974
+ define_str_func("upper", (function() {
3975
+ var ρσ_anonfunc = function () {
3976
+ return this.toUpperCase();
3977
+ };
3978
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
3979
+ __module__ : {value: "__main__"}
3342
3980
  });
3343
3981
  return ρσ_anonfunc;
3344
3982
  })());
3345
- define_str_func("lower", function () {
3346
- return this.toLowerCase();
3347
- });
3348
- define_str_func("upper", function () {
3349
- return this.toUpperCase();
3350
- });
3351
3983
  define_str_func("lstrip", (function() {
3352
3984
  var ρσ_anonfunc = function (chars) {
3353
3985
  var string, pos;
@@ -3363,7 +3995,8 @@ define_str_func("lstrip", (function() {
3363
3995
  return string;
3364
3996
  };
3365
3997
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3366
- __argnames__ : {value: ["chars"]}
3998
+ __argnames__ : {value: ["chars"]},
3999
+ __module__ : {value: "__main__"}
3367
4000
  });
3368
4001
  return ρσ_anonfunc;
3369
4002
  })());
@@ -3382,7 +4015,8 @@ define_str_func("rstrip", (function() {
3382
4015
  return string;
3383
4016
  };
3384
4017
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3385
- __argnames__ : {value: ["chars"]}
4018
+ __argnames__ : {value: ["chars"]},
4019
+ __module__ : {value: "__main__"}
3386
4020
  });
3387
4021
  return ρσ_anonfunc;
3388
4022
  })());
@@ -3391,7 +4025,8 @@ define_str_func("strip", (function() {
3391
4025
  return ρσ_str.prototype.lstrip.call(ρσ_str.prototype.rstrip.call(this, chars), chars);
3392
4026
  };
3393
4027
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3394
- __argnames__ : {value: ["chars"]}
4028
+ __argnames__ : {value: ["chars"]},
4029
+ __module__ : {value: "__main__"}
3395
4030
  });
3396
4031
  return ρσ_anonfunc;
3397
4032
  })());
@@ -3405,7 +4040,8 @@ define_str_func("partition", (function() {
3405
4040
  return [this.slice(0, idx), sep, this.slice(idx + sep.length)];
3406
4041
  };
3407
4042
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3408
- __argnames__ : {value: ["sep"]}
4043
+ __argnames__ : {value: ["sep"]},
4044
+ __module__ : {value: "__main__"}
3409
4045
  });
3410
4046
  return ρσ_anonfunc;
3411
4047
  })());
@@ -3419,7 +4055,8 @@ define_str_func("rpartition", (function() {
3419
4055
  return [this.slice(0, idx), sep, this.slice(idx + sep.length)];
3420
4056
  };
3421
4057
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3422
- __argnames__ : {value: ["sep"]}
4058
+ __argnames__ : {value: ["sep"]},
4059
+ __module__ : {value: "__main__"}
3423
4060
  });
3424
4061
  return ρσ_anonfunc;
3425
4062
  })());
@@ -3447,7 +4084,8 @@ define_str_func("replace", (function() {
3447
4084
  return string;
3448
4085
  };
3449
4086
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3450
- __argnames__ : {value: ["old", "repl", "count"]}
4087
+ __argnames__ : {value: ["old", "repl", "count"]},
4088
+ __module__ : {value: "__main__"}
3451
4089
  });
3452
4090
  return ρσ_anonfunc;
3453
4091
  })());
@@ -3489,7 +4127,8 @@ define_str_func("split", (function() {
3489
4127
  return ρσ_list_decorate(ans);
3490
4128
  };
3491
4129
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3492
- __argnames__ : {value: ["sep", "maxsplit"]}
4130
+ __argnames__ : {value: ["sep", "maxsplit"]},
4131
+ __module__ : {value: "__main__"}
3493
4132
  });
3494
4133
  return ρσ_anonfunc;
3495
4134
  })());
@@ -3551,7 +4190,8 @@ define_str_func("rsplit", (function() {
3551
4190
  return ρσ_list_decorate(ans);
3552
4191
  };
3553
4192
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3554
- __argnames__ : {value: ["sep", "maxsplit"]}
4193
+ __argnames__ : {value: ["sep", "maxsplit"]},
4194
+ __module__ : {value: "__main__"}
3555
4195
  });
3556
4196
  return ρσ_anonfunc;
3557
4197
  })());
@@ -3575,23 +4215,30 @@ define_str_func("splitlines", (function() {
3575
4215
  return ρσ_list_decorate(ans);
3576
4216
  };
3577
4217
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3578
- __argnames__ : {value: ["keepends"]}
4218
+ __argnames__ : {value: ["keepends"]},
4219
+ __module__ : {value: "__main__"}
3579
4220
  });
3580
4221
  return ρσ_anonfunc;
3581
4222
  })());
3582
- define_str_func("swapcase", function () {
3583
- var ans, a, b;
3584
- ans = new Array(this.length);
3585
- for (var i = 0; i < ans.length; i++) {
3586
- a = (ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i];
3587
- b = a.toLowerCase();
3588
- if (a === b) {
3589
- b = a.toUpperCase();
4223
+ define_str_func("swapcase", (function() {
4224
+ var ρσ_anonfunc = function () {
4225
+ var ans, a, b;
4226
+ ans = new Array(this.length);
4227
+ for (var i = 0; i < ans.length; i++) {
4228
+ a = (ρσ_expr_temp = this)[(typeof i === "number" && i < 0) ? ρσ_expr_temp.length + i : i];
4229
+ b = a.toLowerCase();
4230
+ if (a === b) {
4231
+ b = a.toUpperCase();
4232
+ }
4233
+ ans[(typeof i === "number" && i < 0) ? ans.length + i : i] = b;
3590
4234
  }
3591
- ans[(typeof i === "number" && i < 0) ? ans.length + i : i] = b;
3592
- }
3593
- return ans.join("");
3594
- });
4235
+ return ans.join("");
4236
+ };
4237
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
4238
+ __module__ : {value: "__main__"}
4239
+ });
4240
+ return ρσ_anonfunc;
4241
+ })());
3595
4242
  define_str_func("zfill", (function() {
3596
4243
  var ρσ_anonfunc = function (width) {
3597
4244
  var string;
@@ -3602,7 +4249,8 @@ define_str_func("zfill", (function() {
3602
4249
  return string;
3603
4250
  };
3604
4251
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3605
- __argnames__ : {value: ["width"]}
4252
+ __argnames__ : {value: ["width"]},
4253
+ __module__ : {value: "__main__"}
3606
4254
  });
3607
4255
  return ρσ_anonfunc;
3608
4256
  })());
@@ -3612,53 +4260,66 @@ define_str_func("zfill", (function() {
3612
4260
  var ρσ_d = {};
3613
4261
  ρσ_d["_string"] = string;
3614
4262
  ρσ_d["_pos"] = 0;
3615
- ρσ_d[ρσ_iterator_symbol] = function () {
3616
- return this;
3617
- };
3618
- ρσ_d["next"] = function () {
3619
- var length, pos, value, ans, extra;
3620
- length = this._string.length;
3621
- if (this._pos >= length) {
3622
- return (function(){
3623
- var ρσ_d = {};
3624
- ρσ_d["done"] = true;
3625
- return ρσ_d;
3626
- }).call(this);
3627
- }
3628
- pos = this._pos;
3629
- value = this._string.charCodeAt(this._pos++);
3630
- ans = "\ufffd";
3631
- if (55296 <= value && value <= 56319) {
3632
- if (this._pos < length) {
3633
- extra = this._string.charCodeAt(this._pos++);
3634
- if ((extra & 56320) === 56320) {
3635
- ans = String.fromCharCode(value, extra);
4263
+ ρσ_d[ρσ_iterator_symbol] = (function() {
4264
+ var ρσ_anonfunc = function () {
4265
+ return this;
4266
+ };
4267
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
4268
+ __module__ : {value: "__main__"}
4269
+ });
4270
+ return ρσ_anonfunc;
4271
+ })();
4272
+ ρσ_d["next"] = (function() {
4273
+ var ρσ_anonfunc = function () {
4274
+ var length, pos, value, ans, extra;
4275
+ length = this._string.length;
4276
+ if (this._pos >= length) {
4277
+ return (function(){
4278
+ var ρσ_d = {};
4279
+ ρσ_d["done"] = true;
4280
+ return ρσ_d;
4281
+ }).call(this);
4282
+ }
4283
+ pos = this._pos;
4284
+ value = this._string.charCodeAt(this._pos++);
4285
+ ans = "\ufffd";
4286
+ if (55296 <= value && value <= 56319) {
4287
+ if (this._pos < length) {
4288
+ extra = this._string.charCodeAt(this._pos++);
4289
+ if ((extra & 56320) === 56320) {
4290
+ ans = String.fromCharCode(value, extra);
4291
+ }
3636
4292
  }
4293
+ } else if ((value & 56320) !== 56320) {
4294
+ ans = String.fromCharCode(value);
3637
4295
  }
3638
- } else if ((value & 56320) !== 56320) {
3639
- ans = String.fromCharCode(value);
3640
- }
3641
- if (with_positions) {
3642
- return (function(){
3643
- var ρσ_d = {};
3644
- ρσ_d["done"] = false;
3645
- ρσ_d["value"] = ρσ_list_decorate([ pos, ans ]);
3646
- return ρσ_d;
3647
- }).call(this);
3648
- } else {
3649
- return (function(){
3650
- var ρσ_d = {};
3651
- ρσ_d["done"] = false;
3652
- ρσ_d["value"] = ans;
3653
- return ρσ_d;
3654
- }).call(this);
3655
- }
3656
- };
4296
+ if (with_positions) {
4297
+ return (function(){
4298
+ var ρσ_d = {};
4299
+ ρσ_d["done"] = false;
4300
+ ρσ_d["value"] = ρσ_list_decorate([ pos, ans ]);
4301
+ return ρσ_d;
4302
+ }).call(this);
4303
+ } else {
4304
+ return (function(){
4305
+ var ρσ_d = {};
4306
+ ρσ_d["done"] = false;
4307
+ ρσ_d["value"] = ans;
4308
+ return ρσ_d;
4309
+ }).call(this);
4310
+ }
4311
+ };
4312
+ if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {
4313
+ __module__ : {value: "__main__"}
4314
+ });
4315
+ return ρσ_anonfunc;
4316
+ })();
3657
4317
  return ρσ_d;
3658
4318
  }).call(this);
3659
4319
  };
3660
4320
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3661
- __argnames__ : {value: ["string", "with_positions"]}
4321
+ __argnames__ : {value: ["string", "with_positions"]},
4322
+ __module__ : {value: "__main__"}
3662
4323
  });
3663
4324
  return ρσ_anonfunc;
3664
4325
  })();
@@ -3675,7 +4336,8 @@ define_str_func("zfill", (function() {
3675
4336
  return items.slice(start || 0, (end === undefined) ? items.length : end).join("");
3676
4337
  };
3677
4338
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3678
- __argnames__ : {value: ["string", "start", "end"]}
4339
+ __argnames__ : {value: ["string", "start", "end"]},
4340
+ __module__ : {value: "__main__"}
3679
4341
  });
3680
4342
  return ρσ_anonfunc;
3681
4343
  })();
@@ -3692,7 +4354,8 @@ define_str_func("zfill", (function() {
3692
4354
  return ans;
3693
4355
  };
3694
4356
  if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {
3695
- __argnames__ : {value: ["string"]}
4357
+ __argnames__ : {value: ["string"]},
4358
+ __module__ : {value: "__main__"}
3696
4359
  });
3697
4360
  return ρσ_anonfunc;
3698
4361
  })();