[Python-Dev] PEP 572: Write vs Read, Understand and Control Flow

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Thu Apr 26 01:54:13 EDT 2018


Chris Angelico writes:

 > Additionally, naming sub-parts of a large expression can assist an
 > interactive debugger, providing useful display hooks and partial
 > results. Without a way to capture sub-expressions inline, this
 > would require refactoring of the original code; with assignment
 > expressions, this merely requires the insertion of a few ``name
 > :=`` markers. Removing the need to refactor reduces the likelihood
 > that the code be inadvertently changed as part of debugging (a
 > common cause of Heisenbugs),

Period here preferred.

 > and is easier to dictate to a student or junior programmer.

True but gratuitous.  It's also true that it's easier to dictate to
Guido or Tim, though you might be happier if you let them refactor!



More information about the Python-Dev mailing list