[Python-Dev] assignment expressions: an alternative proposal
Steven D'Aprano
steve at pearwood.info
Tue Apr 24 12:28:11 EDT 2018
On Tue, Apr 24, 2018 at 10:58:24AM -0400, Yury Selivanov wrote:
> Since 'diff' and 'g' must be new names according to rule (3), those
> who read the code will notice that both were not previously bound.
How am I supposed to notice that they've never been bound without
carefully reading through the rest of the function in detail, checking
every single expression and statement?
And besides, you have already established that there are exceptions to
the rule "names must be new names". For example, in loops.
What other exceptions are there?
--
Steve
More information about the Python-Dev
mailing list