processing / processing/libprocessing

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

Đang mở
#162 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

A-Mewnala
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

  • 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

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.