> As the PEP author, that's your job. > I started writing the PEP, and I found an interesting example:
if not (m := re.match(r'^(\d+)-(\d+)$', identifier): raise ValueError('f{identifier} is not a valid identifier') print(f'first part is {m.group(1)}') print(f'first part is {m.group(2)}') That's fairly easy to understand, and not something that can be resolved with `as` if it's part of the `if` and `while` statement, rather than a different syntax for the `:=` semantics. That one would have to be written as it is done now: m = re.match(r'^(\d+)-(\d+)$', identifier) if not m: raise ValueError('f{identifier} is not a valid identifier') print(f'first part is {m.group(1)}') print(f'first part is {m.group(2)}') -- Juancarlo *Añez*
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/