Add Wasm Evaluators to Python Language#19
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces WebAssembly evaluators for Python versions 1 through 4 by adding new evaluator definitions and including them in the respective language configurations. Feedback was provided regarding the hardcoded base URL used across multiple files, suggesting the use of a shared constant to improve maintainability.
| const python1Wasm: IEvaluatorDefinition = { | ||
| id: "python1Wasm", | ||
| name: "WebAssembly", | ||
| path: "https://source-academy.github.io/py-slang/PyWasmEvaluator1.js", |
There was a problem hiding this comment.
The base URL https://source-academy.github.io/py-slang/ is hardcoded here and across multiple other files (python2.ts, python3.ts, python4.ts). This duplication creates a maintenance risk if the hosting location changes. Consider defining a shared constant for the base URL in a central location (e.g., a constants file or the python/index.ts file) to ensure a single source of truth.
waiting for source-academy/py-slang#149 to be merged