Python 3.14.0 beta 1 is here!

2025-05-07 Thread Hugo van Kemenade via Python-list
Only one day late, welcome to the first beta! https://www.python.org/downloads/release/python-3140b1/ This is a beta preview of Python 3.14 Python 3.14 is still in development. This release, 3.14.0b1, is the first of four planned beta releases. Beta release previews are intended to give the wid

backslash in triple quoted string

2025-05-07 Thread Bob van der Poel via Python-list
Did something change in python buggering up my use of a "\ " sequence in a triple quoted string? I have yet to go through my archive on the program, but I tried to run it today and it crashed quite spectacularly when it hit a """ """ line being used as a comment at the top of a function. I ch

Re: backslash in triple quoted string

2025-05-07 Thread Left Right via Python-list
I think it could be this: A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compi

Re: backslash in triple quoted string

2025-05-07 Thread Left Right via Python-list
Also, it appears that the change linked above is a lie: https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-python-grammar-longstringitem According to the grammar, any character can follow backslash in a valid Python program. The warning / error raised by this code should not