Protocol Buffer Basics: Python refers to __metaclass__ but there is none of that in the code snippet
@jguamie đang làm issue này rồi.
Từ ngày 17/10/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Looking at the rendered output of the Python Tutorial today, I see the following paragraph, which still references __metaclass__. I think some more cleanup in needed, but I'm not sure what...
The important line in each class is
__metaclass__ = reflection.GeneratedProtocolMessageType. While the details of how Python metaclasses work is beyond the scope of this tutorial, you can think of them as like a template for creating classes. At load time, theGeneratedProtocolMessageTypemetaclass uses the specified descriptors to create all the Python methods you need to work with each message type and adds them to the relevant classes.
It looks like some cleanup was done in response to #124 in commit 654b896, but there are still some lingering references to __metaclass__ that makes the documentation confusing.
- Ngôn ngữ chính
- HTML
- Star
- 69
- Fork
- 180
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 protocolbuffers/protocolbuffers.github.io
-
Typos and confusing docs in the "Go Generated Code Guide (Open)"Có thể đã có người làm @Semak12345 đã nhận 79 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Protocol BuffersĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
protocolbuffers/protocolbuffers.github.io#319 · 1 bình luận ·
-
Python Generated Code GuideĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Python Generated Code GuideĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100