pythonlib 2.0.1 → 2.0.3

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.
@@ -459,6 +459,9 @@ function ascii(x) {
459
459
  return result;
460
460
  }
461
461
  function isinstance(obj, classInfo) {
462
+ if (Array.isArray(classInfo)) {
463
+ return classInfo.some((cls) => isinstance(obj, cls));
464
+ }
462
465
  if (classInfo === Number || classInfo === "int" || classInfo === "float") {
463
466
  return typeof obj === "number";
464
467
  }
@@ -670,6 +673,7 @@ function setattr(obj, name, value) {
670
673
  ;
671
674
  obj[name] = value;
672
675
  }
676
+ var Ellipsis = /* @__PURE__ */ Symbol.for("python.Ellipsis");
673
677
 
674
678
  // src/list.ts
675
679
  var list2 = {
@@ -1099,6 +1103,7 @@ export {
1099
1103
  getattr,
1100
1104
  hasattr,
1101
1105
  setattr,
1106
+ Ellipsis,
1102
1107
  list2,
1103
1108
  dict2,
1104
1109
  set2
@@ -60,7 +60,7 @@ import {
60
60
  tuple,
61
61
  type,
62
62
  zip
63
- } from "./chunk-5OKGPZBQ.js";
63
+ } from "./chunk-LV6MBFIK.js";
64
64
  import {
65
65
  subprocess_exports
66
66
  } from "./chunk-THMJVAK6.js";
package/dist/index.d.ts CHANGED
@@ -170,5 +170,6 @@ declare const format: typeof format$1;
170
170
  declare const getattr: typeof getattr$1;
171
171
  declare const hasattr: typeof hasattr$1;
172
172
  declare const setattr: typeof setattr$1;
173
+ declare const Ellipsis: symbol;
173
174
 
174
- export { abs, all, any, ascii, at, base64, bin, bool, chr, collections, contains, copy, datetime, dict, divMod, enumerate, filter, float, floorDiv, format, functools, getattr, glob, hasattr, hashlib, hex, input, int, is, isinstance, iter, itertools, json, len, list, logging, map, math, max, min, mod, oct, ord, os, pathlib, random, range, re, repr, reversed, round, set, setattr, shutil, slice, sorted, sprintf, str, strFormat, string, subprocess, sum, sys, tempfile, time, tuple, type, urllib, uuid, zip };
175
+ export { Ellipsis, abs, all, any, ascii, at, base64, bin, bool, chr, collections, contains, copy, datetime, dict, divMod, enumerate, filter, float, floorDiv, format, functools, getattr, glob, hasattr, hashlib, hex, input, int, is, isinstance, iter, itertools, json, len, list, logging, map, math, max, min, mod, oct, ord, os, pathlib, random, range, re, repr, reversed, round, set, setattr, shutil, slice, sorted, sprintf, str, strFormat, string, subprocess, sum, sys, tempfile, time, tuple, type, urllib, uuid, zip };
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  shutil_node_exports
12
12
  } from "./chunk-JVTQM7CI.js";
13
13
  import {
14
+ Ellipsis,
14
15
  abs,
15
16
  all,
16
17
  any,
@@ -63,7 +64,7 @@ import {
63
64
  tuple,
64
65
  type,
65
66
  zip
66
- } from "./chunk-5OKGPZBQ.js";
67
+ } from "./chunk-LV6MBFIK.js";
67
68
  import {
68
69
  subprocess_exports
69
70
  } from "./chunk-THMJVAK6.js";
@@ -228,7 +229,9 @@ var format2 = format;
228
229
  var getattr2 = getattr;
229
230
  var hasattr2 = hasattr;
230
231
  var setattr2 = setattr;
232
+ var Ellipsis2 = Ellipsis;
231
233
  export {
234
+ Ellipsis2 as Ellipsis,
232
235
  abs2 as abs,
233
236
  all2 as all,
234
237
  any2 as any,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pythonlib",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Python standard library for TypeScript - itertools, functools, collections, datetime, re, and more. Zero dependencies. Full TypeScript support.",
5
5
  "homepage": "https://sebastian-software.github.io/python2ts/",
6
6
  "repository": {