`width` & `height` are not accessible as globals across imported Python modules in the same directory

未關閉
#162 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
50/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
python, rust
領域
api, backend

研究方向

重現 noc-2-mewnala-port/chapter2/Example_2_6_Attraction 中的行為,其中 setup 定義 width 和 height,而 Attractor.py 和 Mover.py 存取它們。首先追蹤同一目錄中的模組如何接收 Processing 狀態;完成條件是這些模組不必將 width 和 height 傳遞給其類別建構函式即可存取它們。

由索引模型根據 Issue 內容生成。

描述

A-Mewnala

Unlike in Processing tabs that exist in the same folder, different Python modules in the same directory does not share width and height information. width and height have to be imported to the Class constructor for now as a workaround.

Example:
noc-2-mewnala-port > chapter2 > Example_2_6_Attraction

  • width and height are declared in Example_2_6_Attraction.py setup
  • Attractor.py and Mover.py are also trying to access width and height
    Note that there is no error anyway if we try to run the sketch without providing width and height to the Classes, but it isn't exposed to modules outside the one that has size(width, height) in the setup
主要語言
Rust
星號
69
分支
14
平均合併
15 天 22 小時
30 天內合併 PR
3

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

processing/libprocessing 的其他 Issue

查看 processing/libprocessing 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。