Docstring of array.array misses 'w' type info and mentions wide/narrow builds
Nadie ha tomado este issue todavía.
- 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:
- 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
- it doesn't mention that since 3.3 the 'u' type is deprecated and 'w' should be used.
- it doesn't mention that 'u' type since 3.9 corresponds to
wchar_tof C compiler used (so usually 2 byte UTF-16 on Windows, 4 byte UTF-32 elsewhere), instead of to narrow/wide Python build. - it doesn't mention the newer 'w' type that is Python's own
Py_UCS44 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
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- 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