input() not including built-in newline if string > 236 characters
Abierto
Nadie ha tomado este issue todavía.
3.13
3.14
stdlib
topic-repl
type-bug
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
Bug description:
When using input() in the REPL, the behavior is not as expected if the string is > 236 characters (in fact, the input text disappears entirely).
#=====
# string = 236 characters
s = """wow this is a really long sentence, like really who types a sentence this long, but i guess if you have something to say that's important and it takes a long time to say, you can write a long sentence for it, especially if shorter works"""
input(s) # expected behavior - this shows the text to the user during input
#=====
# string > 236 characters
s = """wow this is a really long sentence, like really who types a sentence this long, but i guess if you have something to say that's important and it takes a long time to say, you can write a long sentence for it, especially if shorter works and you need more text"""
input(s) # unexpected behavior - this does not show the text to the user during input
#=====
# string > 236 characters, with manual newline added
s = """wow this is a really long sentence, like really who types a sentence this long, but i guess if you have something to say that's important and it takes a long time to say, you can write a long sentence for it, especially if shorter works and you need more text\n"""
input(s) # unexpected behavior - this shows the text to the user, but the prompt is not at the end of the string
CPython versions tested on:
3.13
Operating systems tested on:
Windows
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
Reproduzca los tres ejemplos con Python 3.13 en Windows, comparando prompts de 236 y de más de 236 caracteres, así como el salto de línea añadido manualmente. Rastree el manejo del prompt de entrada de REPL que produce el texto que desaparece o queda mal colocado; el trabajo estará terminado cuando los prompts largos permanezcan visibles y el cursor de entrada esté al final del prompt.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli, operating-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100