فهرست منبع

docs(code-runtime-worker): correct __debug__ attribution in binding-global comment

The inline comment called every dunder entry "the Python backend's" slot,
but `__debug__` is a CPython compile-time constant, not a seeded slot;
align the comment with the seam declaration, which is the single home for
why each entry is reserved.
Chinesezjc 1 ماه پیش
والد
کامیت
e15e3db2b1
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      packages/code-runtime/code-runtime-worker/src/index.ts

+ 5 - 3
packages/code-runtime/code-runtime-worker/src/index.ts

@@ -324,9 +324,11 @@ export class WorkerCodeRuntime extends CodeRuntime {
         throw new Error(`dsh-code-runtime-worker: binding global ${JSON.stringify(namespace.global)} is not a usable identifier`)
       }
       // RESERVED_BINDING_GLOBALS is the seam's shared backend-owned set:
-      // `console` is THIS backend's log-capture slot; the dunder entries are
-      // the Python backend's — refused here too so the namespace list stays
-      // portable across backends.
+      // `console` is THIS backend's log-capture slot; the dunder entries exist
+      // for the Python side — its seeded/wrapped slots plus the `__debug__`
+      // compile-time constant — refused here too so the namespace list stays
+      // portable across backends. The seam declaration is the single home for
+      // why each entry is reserved.
       if (RESERVED_BINDING_GLOBALS.has(namespace.global)) {
         throw new Error(`dsh-code-runtime-worker: reserved binding global ${JSON.stringify(namespace.global)}`)
       }