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
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.
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Windows
Linked PRs