Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Confused about self.parent

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

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với traitlets/config/configurable.py, khoảng dòng 47, và so sánh định nghĩa của lớp cha với các kết quả tìm kiếm trong tài liệu. Xác định xem tài liệu có giải thích ngữ nghĩa và mục đích sử dụng của self.parent hay không; được xem là hoàn tất khi hành vi và mối quan hệ với các instance Configurable cha được ghi lại rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello, I am making heavy use of self.parent in some code I wrote, but:

  1. searching the docs does not define parent
  2. searching the repo for def parent does not yield any results
  3. There are a number of red herrings in the search to understand what self.parent does and where it is documented because of toy examples in the issues and the docs where we have class Child and Class Parent where the Child class has a slot accessed via self.parent ... this is not the self.parent that is being heavily used in my Traitlets-based applications... but for the life of me, I cannot remember why I started using it and what the semantics are.

Actually I think I found it : it's defined as "The parent Configurable instance of this object." ... ah I think I know the purpose of this... it's to get at the Application class that is the parent of the Configurable class so that you can access slots within the Application... is that correct?

Ngôn ngữ chính
Python
Star
653
Fork
217
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Issue khác của ipython/traitlets

Tất cả issue của ipython/traitlets

Issue tương tự

Thêm issue về Python

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.