`width` & `height` are not accessible as globals across imported Python modules in the same directory
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Tái hiện hành vi trong noc-2-mewnala-port/chapter2/Example_2_6_Attraction, trong đó setup định nghĩa width và height còn Attractor.py và Mover.py truy cập chúng. Trước tiên, hãy theo dõi cách các module trong cùng thư mục nhận trạng thái Processing; hoàn tất khi các module đó có thể truy cập width và height mà không truyền chúng vào các hàm khởi tạo lớp của mình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
widthandheightare declared inExample_2_6_Attraction.pysetupAttractor.pyandMover.pyare also trying to accesswidthandheight
Note that there is no error anyway if we try to run the sketch without providingwidthandheightto the Classes, but it isn't exposed to modules outside the one that hassize(width, height)in thesetup
- Ngôn ngữ chính
- Rust
- Star
- 69
- Fork
- 14
- Merge trung bình
- 15 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của processing/libprocessing
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
processing/libprocessing#233 ·
-
Dropping Python 3.10 support Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
processing/libprocessing#229 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
processing/libprocessing#201 ·
-
Gate processing_midi for WASM Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
processing/libprocessing#194 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
processing/libprocessing#146 · 1 bình luận ·