Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

In-place array repetition changes values without updating serialized TOML

Đang mở
#646 1 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 3 ngày

@harbinresearcher đang làm issue này rồi.

Từ ngày 12/10/2026.

  • #647 của @harbinresearcher — đang mở

Đánh giá

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

Hướng nghiên cứu

Start with the array's in-place repetition behavior and the existing clear() and extend() paths mentioned in the issue. Add tests for a *= 0, a *= 2, and negative repetition that compare the array values, serialized TOML, and a subsequent mutation. Done means all three stay synchronized; the issue links open pull request #647, so check its status before starting.

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

Mô tả

On current master (858186a3), in-place array repetition changes the Python list but leaves the serialized TOML unchanged:

import tomlkit

doc = tomlkit.parse("a = [1, 2]\n")
a = doc["a"]
a *= 0
assert a == []
print(tomlkit.dumps(doc))  # still a = [1, 2]

With a *= 2, the values become [1, 2, 1, 2], but the document still serializes [1, 2]. Negative repetition similarly clears the list without clearing the rendered values. The array remains the same object attached to the document.

I plan to synchronize this existing list operation by using the array's current clear() / extend() paths, with tests that compare values, serialization and subsequent mutation. This does not change sorting/reordering behavior discussed in #233.

Prepared with AI assistance. I found no repetition-related issue or PR; please flag any overlapping work.

Ngôn ngữ chính
Python
Star
859
Fork
186
Merge trung bình
4 ngày 14 giờ
Pull request đã merge (30 ngày)
22

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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-poetry/tomlkit

Tất cả issue của python-poetry/tomlkit

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.