REPL: unexpected behavior with (non break space) on Windows
オープン
まだ誰も着手していません。
stdlib
topic-repl
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Windows Python REPL で比較を再現し、OS 組み込みターミナルと VS Code 統合ターミナルの両方を使用し、REPL から入力をコピーし戻す操作も含めます。まず、REPL の Windows ターミナルにおける入力処理とコピー/貼り付け処理を追跡します。改行なしスペースが通常のスペースと区別されたままになり、比較結果が一貫して false と評価されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100