Maybe I didn't explain it correctly. What I meant was to do exactly the same that happened with <>/!=. That is, add nobreak in Py3 (allowing the use of both else/nobreak) and only deprecate else in Py4.
On 22/07/2020 22:22, Chris Angelico wrote:
On Thu, Jul 23, 2020 at 7:06 AM João Matos email@example.com wrote:
Why not just use Raymond's suggestion nobreak as a replacement of the else in loops and deprecate the else in Python 4? There is at least a precedent when not equal <> was deprecated in favor of != from Py2 to Py3. We could do the same with else/nobreak between Py3 and Py4.
Py2 supported both <> and !=, so code could be completely compatible with both branches just by using !=. You're proposing creating a new way of doing things and then deprecating or removing one of them, which either means there'll be two identical spellings, or you break everyone's code (or both). It's almost the opposite of the <> change.
Please, everyone, can we NOT keep coming up with ideas that are basically "let's invent a new spelling for exactly the same thing, with no benefits, and demanding new keywords, so we can break people's code for no reason"? You can always just write your own transpiler to let yourself spell it your preferred way.
ChrisA _______________________________________________ Python-ideas mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://firstname.lastname@example.org/message/GSBEBZ... Code of Conduct: http://python.org/psf/codeofconduct/