Documented parameter names of some email.utils functions don't match the implementation

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

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

Hướng nghiên cứu

The issue identifies the email.utils documentation and the affected functions: parseaddr(), parsedate(), parsedate_tz(), parsedate_to_datetime(), and mktime_tz(). Compare their documented parameter names with the implementation, then update the docs and check that each name matches; the issue body also lists linked PR gh-161818, so the work may already be underway.

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

Mô tả

docs topic-email

Documentation

A few functions in the email.utils docs show a parameter name that differs from the real one. Anyone copying the name from the docs gets a TypeError:

>>> from email.utils import parsedate
>>> parsedate(date='Mon, 20 Nov 1995 19:12:08 -0500')
TypeError: parsedate() got an unexpected keyword argument 'date'. Did you mean 'data'?
>>> parsedate(data='Mon, 20 Nov 1995 19:12:08 -0500')
(1995, 11, 20, 19, 12, 8, 0, 1, -1)
Function Docs Code
parseaddr() address addr
parsedate(), parsedate_tz(), parsedate_to_datetime() date data
mktime_tz() tuple data
Linked PRs
  • gh-161818
Ngôn ngữ chính
Python
Star
78.2k
Fork
36.6k
Merge trung bình
19 giờ 57 phút
Pull request đã merge (30 ngày)
630

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 python/cpython

Tất cả issue của python/cpython

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.