The error messages of `dict()` and `dict().update()` should say `positional argument` instead of only `argument`
Đang mở
@serhiy-storchaka đang làm issue này rồi.
Từ ngày 26/8/2025.
interpreter-core
type-bug
- 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ả
Setting 2 positional arguments to dict() and dict().update() gets the error messages saying only argument as shown below:
dict('John', 36)
dict().update('John', 36)
# Error
TypeError: dict expected at most 1 argument, got 2
TypeError: update expected at most 1 argument, got 2
But the error messages should say positional argument instead of only argument as shown below:
TypeError: dict expected at most 1 positional argument, got 2
TypeError: update expected at most 1 positional argument, got 2
Because setting 2 keyword arguments to dict() works as shown below:
dict(name='John', age=36)
dict().update(name='John', age=36)
# No error
Linked PRs
- gh-137721
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.
Đánh giá
Issue này chưa được đánh giá.