class.__annotations__ gives weird value when using built-in type keywords as attribute
Đang mở
@sobolevn đang làm issue này rồi.
Từ ngày 12/8/2024.
docs
topic-typing
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 36k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
Bug description:
class some:
int : int = 1
normal : int = 1
some.__annotations__
returns:
{'int': 1, 'normal': 1}
class some:
int_ : int = 1
normal : int = 1
some.__annotations__
returns:
{'int_': int, 'normal': int}
CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux, Windows
Linked PRs
- gh-123060
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á.