Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Closed
Copy link
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I use Python downloaded from python.org without using a graphical environment such as IPython. Instead, I use the Windows Terminal with the REPL built into python.exe. In 3.12.6, I can paste a function definition copied from a text editor directly into the REPL and everything works fine. In 3.13.rc2 this does not work; the indentation is all messed up and I get an IndentationError.
defletter_colors(word, guess): '''Compute letter colors for Wordle guesses. B=black Y=yellow G=green'''if (n:=len(word)) !=len(guess): raiseValueError('Word and guess must be the same length.') result= ['G'ifwl==glelse'B'for (wl, gl) inzip(word, guess)] unused= [wfor (w, r) inzip(word, result) ifr=='B'] fori, cinenumerate(guess): ifresult[i] !='G'andcinunused: result[i] ='Y'unused.remove(c) return''.join(result)CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Windows
Linked PRs
teuncm
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error