input() not including built-in newline if string > 236 characters
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 77.2k
- Forks
- 35.9k
- Métriques de merge des PR
- Métriques de PR en attente
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez les trois exemples avec Python 3.13 sous Windows, en comparant des invites de 236 caractères et de plus de 236 caractères, ainsi que le saut de ligne ajouté manuellement. Suivez le traitement de l'invite de saisie du REPL qui produit le texte qui disparaît ou est mal positionné ; la tâche est terminée lorsque les invites longues restent visibles et que le curseur de saisie se trouve à la fin de l'invite.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- cli, operating-systems
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100