REPL: unexpected behavior with (non break space) on Windows
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Bug report
Bug description:
Copy " "==" " into Python REPL (the first space is non breakable, you need to generate a new one though), there are two problems I found:
- In OS built-in terminal, it is always true
Python 3.13.12 (tags/v3.13.12:1cbe481, Feb 3 2026, 18:22:25) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> " "==" "
True
>>> " "==" " # copied
True
- In Vscode integrated terminal, it was false as expected at first. But if you copied from the REPL then, the non break space somehow has changed to normal space, this is the same behavior with the built-in terminal.
Python 3.13.12 (tags/v3.13.12:1cbe481, Feb 3 2026, 18:22:25) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
>>> " "==" "
False
>>> " "==" " # copied
True
On Linux at least Ubuntu, it behave correctly as expected.
Python 3.12.3 (main, Mar 3 2026, 12:15:18) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> " "==" "
False
>>> " "==" " # copied
False
Based on testing multiple versions, it appears that version is not a factor.
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza a comparação no Windows Python REPL usando tanto o terminal integrado ao sistema operacional quanto o terminal integrado do VS Code, incluindo copiar a entrada de volta do REPL. Comece rastreando o tratamento da entrada do terminal do Windows do REPL e o tratamento de copiar e colar. Está concluído quando um espaço sem quebra permanece distinto de um espaço normal e a comparação é avaliada consistentemente como false.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- cli, operating-systems
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 38/100