Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

In-place array repetition changes values without updating serialized TOML

Abierto
#646 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@harbinresearcher ya está trabajando en esto.

Desde el 12/10/2026.

  • #647 de @harbinresearcher — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
859
Forks
186
Merge medio
4 d 14 h
PR fusionados (30 d)
22

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python-poetry/tomlkit

Todos los issues de python-poetry/tomlkit

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.