Meta issue: improve documentation for implementation of the PEP 3118 in Python
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Documentation
Recent d.p.o discussion thread and SC decision reveal some problems with current docs. Affected parts are the memoryview and struct/array/ctypes modules. I'll list issues in a random order with a hope that people will extend/correct this list:
- The struct module docs has Format Characters section. Though, some type codes now have more than one character. We should rename this section and use some different term. Format Codes? // https://github.com/python/cpython/pull/149483
- array docs says: The type is specified at object creation time by using a type code, which is a single character. // https://github.com/python/cpython/pull/149483
- memoryview docs are too vague in their references to the struct module:
- "format" described as being "in struct module style"
- it might be not clear that means "single element native format" (C type with native byte size, native endianness, and native alignment)
- ctypes has no documentation for the buffer protocol support at all; though, it's probably most advanced across of the stdlib, see
Lib/test/test_ctypes/test_pep3118.py. -
ctypes._SimpleCData._type_docs says "Class attribute that contains an internal type code, as a single-character string. See Fundamental data types for a summary." // https://github.com/python/cpython/pull/149483
Linked PRs
- gh-149483
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.
Hướng nghiên cứu
Bắt đầu với các phần tài liệu về memoryview, struct, array và ctypes, sau đó đọc cuộc thảo luận được liên kết và quyết định của SC về thuật ngữ dự kiến của PEP 3118. Sử dụng Lib/test/test_ctypes/test_pep3118.py để hiểu hành vi buffer protocol hiện có của ctypes. Công việc được xem là hoàn tất khi các tham chiếu đến định dạng memoryview chính xác và hỗ trợ buffer của ctypes được ghi lại trong tài liệu.
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
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100