python / python/cpython

Docstring of array.array misses 'w' type info and mentions wide/narrow builds

Abierto
#142,083 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

docs
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Documentation

The docstring of array.array at https://github.com/python/cpython/blob/cfcd52490d6531f3b0e8ddd4bb2b40fb6baee854/Modules/arraymodule.c#L2912 has a few mistakes:

  1. in description of 'u' type it mentions the narrow/wide build split that is not a thing since 3.3 - https://docs.python.org/3/whatsnew/3.3.html#functionality
  2. it doesn't mention that since 3.3 the 'u' type is deprecated and 'w' should be used.
  3. it doesn't mention that 'u' type since 3.9 corresponds to wchar_t of C compiler used (so usually 2 byte UTF-16 on Windows, 4 byte UTF-32 elsewhere), instead of to narrow/wide Python build.
  4. it doesn't mention the newer 'w' type that is Python's own Py_UCS4 4 byte UTF-32.

The documentation at https://docs.python.org/3/library/array.html doesn't have these issues, only the docstring (that is shown in help(array.array) in the REPL) does. This is a mismatch between documentation and docstring.

Linked PRs
  • gh-142323

Guía de contribución

Abrir la 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.

Línea de trabajo

Empieza en Modules/arraymodule.c, alrededor de la cadena de documentación de array.array a la que hace referencia la issue, y compárala después con la documentación de array en docs.python.org/3/library/array.html. Se considera terminado cuando la cadena de documentación cubra la información actual de los tipos 'u' y 'w' sin la redacción obsoleta sobre builds narrow/wide; revisa el PR vinculado gh-142323 antes de empezar.

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

Evaluación

Stack tecnológico
c, python
Área
documentation
Tipo de issue
Documentación
Dificultad
1/5
Tiempo estimado
Menos de una hora
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.