processing / processing/libprocessing
`width` & `height` are not accessible as globals across imported Python modules in the same directory
Chưa có ai nhận issue này.
- 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
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
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.
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.
Đánh giá
- Công nghệ
- python, rust
- Lĩnh vực
- api, backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 50/100